emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to expand macro in LaTeX export? How to use different options pe


From: Eric S Fraga
Subject: Re: How to expand macro in LaTeX export? How to use different options per export type?
Date: Wed, 31 Mar 2021 11:45:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Wednesday, 31 Mar 2021 at 13:29, Jean Louis wrote:
> By doing this:
>
> @@latex:\def\version{@@ {{{version}}} @@latex:}@@
>
> Then {{{version}}} will get expanded in the document, right? As I have
> hidden then only tags surrounding {{{version}}}.

Yes.

>> Also, a macro can itself use the @@ directive to provide alternate
>> versions for LaTeX and HTML, as in
>> 
>> #+macro: blah @@html:some HTML code@@@@latex: some LaTeX code@@
>
> I have tried this:
>
> #+OPTIONS: @@html:title:t toc:t@@ @@latex:title:nil toc:nil@@ todo:nil
>
> But it is not working in options. It would be good if it works in OPTIONS.

The reason it can work in the macro but not for options is that the
macro is expanded into the text and then the text is processed as normal
text so the @@ directives are processed.  The options line does not go
through the same processing.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-254-g37749c



reply via email to

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