* Eric S Fraga <e.fr...@ucl.ac.uk> [2021-03-31 13:06]: > On Wednesday, 31 Mar 2021 at 12:40, Jean Louis wrote: > > But then the line with \def\version{ {{{version}}} } gets shown in > > HTML export, which is not what I want. How to resolve that? > > Can you surround the line with @@latex: ... @@? > > You might need to do @@latex:\def\version{@@ {{{version}}} > @@latex:}@@
I did not know this, it looks like a solution in sight. Thank you. 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}}}. > 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. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns