* macro expansion not working in #+ATTR_LATEX
@ 2013-09-05 19:33 Johannes Rainer
2013-09-05 19:55 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Rainer @ 2013-09-05 19:33 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
hi all!
while working nicely for plain text I realized that macros are not expanded
if put in #+ATTR_LATEX:
e.g. I defined
#+MACRO: image_width 16
and wanted to use this macro like
#+ATTR_LATEX: :center :placement [H] :width {{{image_width}}}cm
however, in the exported tex file I get:
\includegraphics[width={{{image_width}}}cm]{test.png}
is that intentional that macro expansion works only for plain text?
thanks, jo
[-- Attachment #2: Type: text/html, Size: 730 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: macro expansion not working in #+ATTR_LATEX
2013-09-05 19:33 macro expansion not working in #+ATTR_LATEX Johannes Rainer
@ 2013-09-05 19:55 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2013-09-05 19:55 UTC (permalink / raw)
To: Johannes Rainer; +Cc: emacs-orgmode
Hello,
Johannes Rainer <johannes.rainer@gmail.com> writes:
> while working nicely for plain text I realized that macros are not expanded
> if put in #+ATTR_LATEX:
>
> e.g. I defined
>
> #+MACRO: image_width 16
>
> and wanted to use this macro like
>
> #+ATTR_LATEX: :center :placement [H] :width {{{image_width}}}cm
>
> however, in the exported tex file I get:
>
> \includegraphics[width={{{image_width}}}cm]{test.png}
>
> is that intentional that macro expansion works only for plain text?
Yes. Macro are only expanded where one can find plain text. See "11.6
Macro replacement" in Org manual.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-05 19:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-05 19:33 macro expansion not working in #+ATTR_LATEX Johannes Rainer
2013-09-05 19:55 ` Nicolas Goaziou
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).