From: Christian Moe <mail@christianmoe.com>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Feature Request] - Furigana - Yomigana - Ruby
Date: Wed, 29 May 2013 09:20:52 +0200 [thread overview]
Message-ID: <m2obbu8d63.fsf@uio.no> (raw)
In-Reply-To: <20130528150156.GA19186@kuru.dyndns-at-home.com>
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
next prev parent reply other threads:[~2013-05-29 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 22:41 [Feature Request] - Furigana - Yomigana - Ruby T.T.N.
2013-05-28 13:00 ` Torsten Wagner
2013-05-28 15:01 ` Suvayu Ali
2013-05-28 15:27 ` Suvayu Ali
2013-05-28 15:34 ` Thomas S. Dye
2013-05-29 7:20 ` Christian Moe [this message]
2013-05-29 7:30 ` Suvayu Ali
2013-05-28 15:43 ` Tristan Nakagawa
2013-05-28 17:36 ` Torsten Wagner
2013-05-29 15:20 ` Tristan Nakagawa
2013-05-29 16:46 ` Christian Moe
2013-05-29 18:15 ` Suvayu Ali
2013-05-29 18:13 ` Suvayu Ali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2obbu8d63.fsf@uio.no \
--to=mail@christianmoe.com \
--cc=emacs-orgmode@gnu.org \
--cc=fatkasuvayu+linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).