On Wed, May 29, 2013 at 09:20:52AM +0200, Christian Moe wrote:
>
> Suvayu Ali writes:
>
> > Maybe we could allow backend specific macro expansion definitions.
> > Something like:
> >
> > #+HTML_MACRO: ruby <ruby> $1 <rp>(</rp><rt>$2</rt><rp>)</rp> <\ruby>
> > #+LATEX_MACRO: ruby \ruby{$1}{$2}
> >
> > Then {{{ruby(東,ひがし)}}} will be expanded appropriately for
> > different backends.
> >
> > What do you think?
>
> Existing (8.0) syntax already offers a way to achieve this using export
> snippets, which now allow and require you to specify backends. To
> recast your example:
>
> #+macro: ruby @@html:<ruby> $1<rp>(</rp><rt>$2</rt><rp>)</rp>
> </ruby>@@@@latex:\ruby{$1}{$2}@@
>
> Then {{{ruby(東,ひがし)}}} will be expanded appropriately for
> different backends.
>
You are right! I had completely forgotten about snippets.
--
Suvayu
Open source is the future. It sets us free.