hi,
I was just wondering if there is a way to use macro expansion also in source code blocks or headers. I tried this, but the macro was never expanded, but rather the {{{image_width}}} was exported. could the expansion be done by calling the macro expansion before export (e.g. using a hook)?
something like this:
#+MACRO: image_width 16
#+BEGIN_SRC R :results silent :exports code
IMAGE <- "test.png"
WIDTH <- {{{image_width}}}
HEIGHT <- 6
png( file=IMAGE, width=WIDTH, height=HEIGHT, units="cm", res=600, pointsize=6 )
library( RColorBrewer )
display.brewer.all()
dev.off()
#+END_SRC
or
#+BEGIN_SRC R :results file :exports results :width {{{image_width}}}
display.brewer.all()
#+END_SRC
cheers, jo