From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giacomo M Subject: Re: Expansion of macros conditional on export type Date: Fri, 27 May 2016 12:26:48 +0200 Message-ID: References: <87shx3954e.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Eyl-0005UQ-1k for emacs-orgmode@gnu.org; Fri, 27 May 2016 06:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6Eyg-0003hk-S9 for emacs-orgmode@gnu.org; Fri, 27 May 2016 06:26:53 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:34918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6Eyg-0003ha-Lj for emacs-orgmode@gnu.org; Fri, 27 May 2016 06:26:50 -0400 Received: by mail-wm0-x234.google.com with SMTP id a136so65880098wme.0 for ; Fri, 27 May 2016 03:26:50 -0700 (PDT) Received: from [127.0.0.1] ([212.189.161.135]) by smtp.gmail.com with ESMTPSA id jd4sm18673498wjb.43.2016.05.27.03.26.49 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 May 2016 03:26:49 -0700 (PDT) In-Reply-To: <87shx3954e.fsf@ucl.ac.uk> 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: "emacs-orgmode@gnu.org" Il 27/05/2016 12:17, Eric S Fraga ha scritto: >> I know one way would be to use @@latex: ... @@ w/ ascii counterpart >> each time, but I would rather envision a single macro, which then gets >> defined in different way depending on the export, in order to reduce >> redundancy. > You can put all the different alternatives together? I do the following > for degrees Celsius: > > #+macro: degc @@odt:°C@@@@latex:\(^{\circ}\)C@@ > > Looks ugly but I don't have to look at it often. In text, I simply have > {{{degc}}}. > > (minor aside: I wish macros had been defined to be used with [[[degc]]] > instead as much easier to type than {{{degc}}}) > Perfect! Actually I hadn't tried to combine them. For chunks of text like institute affiliations, may I ask if you use different BEGIN_EXPORT blocks or sth else? Thanks a lot, Giacomo