emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Giacomo M <jackjackk@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Expansion of macros conditional on export type
Date: Fri, 27 May 2016 12:26:48 +0200	[thread overview]
Message-ID: <cfccc078-218d-6afb-2e34-9b8bf08ce725@gmail.com> (raw)
In-Reply-To: <87shx3954e.fsf@ucl.ac.uk>

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

  reply	other threads:[~2016-05-27 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e68e190f9062467895032baf9323e391@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-05-27 10:17 ` Expansion of macros conditional on export type Eric S Fraga
2016-05-27 10:26   ` Giacomo M [this message]
     [not found]   ` <b07885246b7249cf8b3b1ff77e9db435@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-05-27 11:08     ` Eric S Fraga
2016-05-27 10:03 Giacomo M

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=cfccc078-218d-6afb-2e34-9b8bf08ce725@gmail.com \
    --to=jackjackk@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).