emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [Feature Request] - Furigana - Yomigana - Ruby


From: Christian Moe
Subject: Re: [O] [Feature Request] - Furigana - Yomigana - Ruby
Date: Wed, 29 May 2013 09:20:52 +0200
User-agent: mu4e 0.9.9.5-dev6; emacs 24.3.1

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.

Note: I have no idea if the above actually results in appropriate
rubies, it's just to demonstrate the basic principle that you can write:

  #+macro: foo @@html:<foo>$1</foo>@@@@latex:\foo{$1}@@

Yours,
Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]