emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: emacs-orgmode@gnu.org
Subject: parameterizing keyword values during a #+call
Date: Thu, 25 Apr 2013 19:45:53 -0400	[thread overview]
Message-ID: <94981.1366933553@greg-minshalls-mbp.local> (raw)

hi.  i would have an org file that uses lots of #+calls to various
asymptote routines (babelled into the file) to produce graphics.  i
would like to export this file to both html and to latex (specifically
beamer).  for html, i would like, e.g., SVG files, and for latex, PDF
files.  the file name is normally passed to the asymptote routine via a
:file parameter, to wit
----
#+call: disc[:file images/disc.svg]() :results file
----
and the file extension (".svg" in the above) determines the format of
the asymptote output.

is there an obvious way to allow the file extension to take on different
values depending on which sort of export is driving its execution?  i
had hoped that replacing ".svg" with something like ".{{{ext()}}}",
where "ext" was a macro which selected amongst the alternatives(*),
would do the trick.  but that doesn't appear to be the case.

thanks in advance (and with full appreciation of what a pain macros
are to implement fully, halfly, anyly), Greg Minshall

(*)
#+MACRO: ext @@latex:pdf@@@@beamer:pdf@@@@html:svg@@

             reply	other threads:[~2013-04-25 23:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 23:45 Greg Minshall [this message]
2013-04-26  1:19 ` Eric Schulte
2013-04-26 11:46   ` Greg Minshall
2013-04-26 22:27   ` Greg Minshall
2013-04-26 22:34     ` Eric Schulte
2013-04-26 22:50       ` Greg Minshall
2013-04-30 14:40       ` Greg Minshall
2013-04-30 18:46         ` Gary Oberbrunner
2013-05-01  5:02           ` Eric Schulte
2013-05-01 10:52 Greg Minshall

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=94981.1366933553@greg-minshalls-mbp.local \
    --to=minshall@umich.edu \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: parameterizing keyword values during a #+call' \
    /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

Code repositories for project(s) associated with this 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).