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

2021-04-03 Thread Juan Manuel MacĂ­as
Jean Louis writes: > Another issue related to this setup is that I would like: > > - for HTML export: title:t toc:t > > - for LaTeX PDF export: title:nil toc:nil > > Is there way to have options different for different exports? You can do it with a macro like this: #+MACRO: titletoc (eval (cond

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

2021-03-31 Thread Greg Minshall
Jean Louis, another thing that i find helpful in understanding the tao of export: if you haven't, look at the help string for the variable ~org-export-options-alist~: [C-h v org-export-options-alist]. cheers, Greg

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

2021-03-31 Thread Greg Minshall
Jean Louis, when publishing, one presents a data structure ~org-publish-project-alist~ that defines the back ends and options for publishing actions. the options are here: https://orgmode.org/manual/Publishing-options.html#Publishing-options below is an example. as you can see,

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

2021-03-31 Thread Jean Louis
* Greg Minshall [2021-03-31 14:33]: > Jean Louis, > > > Another issue related to this setup is that I would like: > > > > - for HTML export: title:t toc:t > > > > - for LaTeX PDF export: title:nil toc:nil > > > > Is there way to have options different for different exports? > > sometimes

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

2021-03-31 Thread Eric S Fraga
> Another solution could be if a program in BEGIN_SRC block could > generate Org inline, so that it gets processed after generation. Or even an inline src block, e.g. src_elisp{...}, which checks the /backend/ for export and outputs accordingly. Search the mailing list as there have been

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

2021-03-31 Thread Greg Minshall
Jean Louis, > Another issue related to this setup is that I would like: > > - for HTML export: title:t toc:t > > - for LaTeX PDF export: title:nil toc:nil > > Is there way to have options different for different exports? sometimes "publishing" gives me easier control over options than

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

2021-03-31 Thread Jean Louis
* Eric S Fraga [2021-03-31 13:46]: > 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

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

2021-03-31 Thread Eric S Fraga
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 @@

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

2021-03-31 Thread Jean Louis
* Eric S Fraga [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

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

2021-03-31 Thread Eric S Fraga
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}}}