emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [Feature Request] - Furigana - Yomigana - Ruby
Date: Tue, 28 May 2013 17:01:56 +0200	[thread overview]
Message-ID: <20130528150156.GA19186@kuru.dyndns-at-home.com> (raw)
In-Reply-To: <CAPaq-gNKWgMPFrbuzR21TkDhs4fAbQCWpoZ4kidO3UcS=8g+qQ@mail.gmail.com>

On Tue, May 28, 2013 at 03:00:40PM +0200, Torsten Wagner wrote:
> 
> However, I believe that for many users, the special cases are not very
> frequent and complex. Might it be possible to create a very simple syntax
> for exporting rules which could be either in those above modules or
> directly within the file written by the user themself?
> 
> #+HTML_USER_RULE   \ruby{$1}{$2}, <ruby> $1 <rp>(</rp><rt>$2</rt><rp>)</rp> <\ruby>

Isn't this very similar to a #+MACRO definition but with a different
syntax and only for the HTML backend?

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?

Cheers,

PS: Actually on second thought it is probably possible to handle this
    with filters although I failed to find the appropriate filter.

    So you could try:

      #+MACRO: ruby <cookie><$1><$2></cookie>

    And the filter can translate the cookie to the appropriate backend
    specific expansion.

-- 
Suvayu

Open source is the future. It sets us free.

  reply	other threads:[~2013-05-28 15:02 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 [this message]
2013-05-28 15:27     ` Suvayu Ali
2013-05-28 15:34     ` Thomas S. Dye
2013-05-29  7:20     ` Christian Moe
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=20130528150156.GA19186@kuru.dyndns-at-home.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).