Hello,

Alan Schmitt <alan.schm...@polytechnique.org> writes:

> Is there a way to define a macro that has different behaviors depending
> on export backend? I have macros that use the @@latex:foo@@ syntax, but
> in that case I "foo" is supposed to be literal latex.
>
> My use case is this one: I have a link to a custom id, and I want to
> export it as [[#id]] in latex and [[file:file.org::#id]] for html
> *before* link resolution happens (so that the custom id in the latex
> export is substituted with the correct label).
>
> Is this possible?

Could you simply preprocess the document to export with a function doing
the change above? Functions in `org-export-before-parsing-hook' are
called with the back-end as the sole argument.

Regards,

-- 
Nicolas Goaziou

Reply via email to