From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: [Feature Request] - Furigana - Yomigana - Ruby Date: Wed, 29 May 2013 09:20:52 +0200 Message-ID: References: <51A3E117.3000900@gmail.com> <20130528150156.GA19186@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhadE-0005fG-Gb for emacs-orgmode@gnu.org; Wed, 29 May 2013 03:17:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhadD-0007fO-DK for emacs-orgmode@gnu.org; Wed, 29 May 2013 03:17:12 -0400 Received: from mail-forward5.uio.no ([2001:700:100:10::37]:56393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhadD-0007ZZ-6E for emacs-orgmode@gnu.org; Wed, 29 May 2013 03:17:11 -0400 Received: from exim by mail-out5.uio.no with local-bsmtp (Exim 4.80.1) (envelope-from ) id 1Uhacb-0001ln-9L for emacs-orgmode@gnu.org; Wed, 29 May 2013 09:16:33 +0200 In-reply-to: <20130528150156.GA19186@kuru.dyndns-at-home.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Suvayu Ali Cc: emacs-orgmode@gnu.org Suvayu Ali writes: > Maybe we could allow backend specific macro expansion definitions. > Something like: > > #+HTML_MACRO: ruby $1 ($2) <\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: $1($2) @@@@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:$1@@@@latex:\foo{$1}@@ Yours, Christian