From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Annotating org exporters Date: Wed, 11 May 2016 08:01:06 -0700 Message-ID: <87vb2kmyfh.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> References: <87futqvwy6.fsf@uwaterloo.ca> <87lh3indnl.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> <874ma5qivl.fsf@uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0VcR-0003dd-DL for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:00:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0VcK-0007pq-Bu for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:00:09 -0400 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:33055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0VcK-0007oX-4h for emacs-orgmode@gnu.org; Wed, 11 May 2016 11:00:04 -0400 Received: by mail-pf0-x235.google.com with SMTP id 206so19595535pfu.0 for ; Wed, 11 May 2016 08:00:03 -0700 (PDT) In-Reply-To: <874ma5qivl.fsf@uwaterloo.ca> 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" To: sfischme@uwaterloo.ca, emacs-orgmode@gnu.org Hi Sebastian and all, Sebastian Fischmeister writes: > I'm still undecided between a regex replace and org-entities. Is there > a straightforward way to define own directives for orgmode to then > support something like the following? > > #+LaTeX_EXPORT: "=>":"$\rightarrow$" > > or more generic > > #+EXPORT_EXPAND: latex:"=>":"$\rightarrow$" > > Then I could just make these expansions part of the standard header in > my org files. Well, there are macros, which do something very similar. As far as I know, they are the only way to achieve this kind of thing without some Elisp. You could do something like: #+MACRO: => @@latex:$\rightarrow$@@ but that actually doesn't seem to work as is, I suspect because "=>" is not an allowable macro name. (It works fine with an alphabetic name like "ARR".) But even if you got it to work, you'd then have to type Some text {{{=>}}} other text after the arrow in your document, which sort of defeats the point of the nice, simple "=>". If it were me, I'd opt for the regex replacement, and avoid typing all the braces. Best, Richard