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