emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* parameterizing keyword values during a #+call
@ 2013-04-25 23:45 Greg Minshall
  2013-04-26  1:19 ` Eric Schulte
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Minshall @ 2013-04-25 23:45 UTC (permalink / raw)
  To: emacs-orgmode

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@@

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: parameterizing keyword values during a #+call
@ 2013-05-01 10:52 Greg Minshall
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Minshall @ 2013-05-01 10:52 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: Orgmode Mailing List

Gary,

> Org-mode macros that got expanded in the middle of babel source block
> text would be cool. Just saying.

i agree with Eric's comment.  if you think of the issue of trying to
parse an arbitrary (and growing) number of languages, trying to avoid
language-specific constructions in your choice of macro-designator
(things like "@@..@@" or "{{..}}" or "$.." or...), etc., you will
probably fairly quickly come to see the benefits of :var as the way of
passing in inputs.

cheers, Greg

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-05-01 10:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-25 23:45 parameterizing keyword values during a #+call Greg Minshall
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
  -- strict thread matches above, loose matches on Subject: below --
2013-05-01 10:52 Greg Minshall

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).