emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Can't export LaTeX source code blocks


From: Sebastien Vauban
Subject: Re: [O] Can't export LaTeX source code blocks
Date: Mon, 22 Apr 2013 23:46:02 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> As shown by the following ECM, I can't export the LaTeX code blocks.
>>
>> #+TITLE:     ECM exports LaTeX code
>> #+Time-stamp: <2013-04-22 Mon 21:31>
>> #+LANGUAGE:  en
>>
>> #+PROPERTY: exports both
>>
>> * Context
>>
>> My goal is to explain different LaTeX blocks which I use to construct a LaTeX
>> class. The document should be exportable to both LaTeX and HTML.
>>
>> * TODO Documentation
>>
>> Here is the LaTeX code:
>>
>> #+name: doc-macro-a
>> #+begin_src latex
>> \DescribeMacro{\dummyMacro}
>> This macro does nothing.\index{doing nothing|usage} It is merely an
>> example.  If this were a real macro, you would put a paragraph here
>> describing \textbf{what} the macro is supposed to do, what its mandatory and
>> optional arguments are, and so forth.
>> #+end_src
>>
>> followed by the LaTeX output:
>>
>> #+results: doc-macro-a
>> #+BEGIN_LaTeX
>> \DescribeMacro{\dummyMacro}
>> This macro does nothing.\index{doing nothing|usage} It is merely an
>> example.  If this were a real macro, you would put a paragraph here
>> describing \textbf{what} the macro is supposed to do, what its mandatory and
>> optional arguments are, and so forth.
>> #+END_LaTeX
>>
>> * Results
>>
>> As you can see, the code block is NEVER exported. I don't understand
>> why?
>
> I'm not sure either.
>
> This is not a problem from the exporter as
> `org-export-execute-babel-code' on your ECM makes the src block
> disappear.
>
>> The results block is exported, but then (interpreted and) only visible in the
>> LaTeX back-end. The HTML document is completely empty...
>
> I can answer that one: "#+begin_BACKEND" means "export this block when
> using export BACKEND, otherwise ignore it". Therefore, html back-end
> ignores the results.

Yes, I agree: that second behavior is logical. I just emphasized it as,
consequently, we can't export anything (not even the results -- though, that
does not make much sense) to HTML, as exposed by the ECM.

The only buggy behavior is the first one: the fact that the "code" block
disappears, as you say.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]