Hi Sebastian and all,
Sebastian Fischmeister <[email protected]> writes:
> I'm still undecided between a regex replace and org-entities. Is there
> a straightforward way to define own directives for orgmode to then
> support something like the following?
>
> #+LaTeX_EXPORT: "=>":"$\rightarrow$"
>
> or more generic
>
> #+EXPORT_EXPAND: latex:"=>":"$\rightarrow$"
>
> Then I could just make these expansions part of the standard header in
> my org files.
Well, there are macros, which do something very similar. As far as I
know, they are the only way to achieve this kind of thing without some
Elisp.
You could do something like:
#+MACRO: => @@latex:$\rightarrow$@@
but that actually doesn't seem to work as is, I suspect because "=>" is
not an allowable macro name. (It works fine with an alphabetic name
like "ARR".) But even if you got it to work, you'd then have to type
Some text {{{=>}}} other text after the arrow
in your document, which sort of defeats the point of the nice, simple
"=>". If it were me, I'd opt for the regex replacement, and avoid
typing all the braces.
Best,
Richard