From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julian Gehring Subject: Re: Custom formatting during export Date: Wed, 03 Sep 2014 09:26:07 -0700 Message-ID: <5407411F.8060702@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDO0-0004KM-UC for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 12:26:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPDNv-0007x8-2Q for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 12:26:20 -0400 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:35959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPDNu-0007wh-Qk for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 12:26:15 -0400 Received: by mail-pd0-f173.google.com with SMTP id p10so11472993pdj.32 for ; Wed, 03 Sep 2014 09:26:10 -0700 (PDT) In-Reply-To: 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: Gabe Becker Cc: emacs-orgmode@gnu.org Hi Gabe, Macro replacements [[http://orgmode.org/manual/Macro-replacement.html]] should be what you are looking for. For example, the macro #+MACRO: pkg $1 would be called by {{{pkg(PkgName)}}} You can also use this to format your input for one or multiple backends #+MACRO: M @@latex:\$1{@@$2@@latex:}@@ Let me know if this helps. Best Julian On 03.09.2014 06:36, Gabe Becker wrote: > orgmode developers and power-users, > > I'd like to be able to declare custom entities (apologies if I'm using > that term incorrectly) within the text of an orgmode document which I > can specify custom formatting for when my .org is exported, e.g. to PDF > or HTML. > > I have a background in Docbook, so the analogue there would be defining > a custom xml tag and then extending the XSL files to handle it as > desired. Please see the following snippet: > > > * section title > Here is some text, but I want [specialthing: this bit here] to be > formatted differently than [newanddifferent: this other big over here]. > > > Where I would have defined specific custom formatting rules for > "specialthing" and "newanddifferent" type entities. > > Is there a way to do this in orgmode? If not, it seems like it would be > a very useful feature (at least to me:) ). Note: I don't care about the > syntax as long as the result is the same. > > Thanks for your help, > ~G > -- > Computational Biologist > Genentech Research