Hi Bastien,

Bastien <b...@gnu.org> writes:

> Brett Viren <b...@bnl.gov> writes:
>
>> Can they have newlines?
>
> I don't think so -- did you try?

Now, there is an idea!  I had not tried, but yes, the are accepted and a
"multiline" macro can be defined using '\n' characters like:

#+MACRO: mimg #+HTML: <a name="$1"><center><img width="100%" src="$2.svg" 
alt="$3"/> $3</center></a>\n#+LATEX: 
\begin{figure}\label{$1}\includegraphics[width=\textwidth]{$2.pdf}\caption{$3}\end{figure}

I can now call this macro with a single line like:

{{{mimg(fig-overview,dataflow,Overview of the data flow.)}}}

and both HTML and LaTeX/PDF export produces correct output.  I give up
the "fig:" style prefix for the label, but that is a small detail.


So, I'm satisfied now.  Thanks for the nudge!

-Brett.

Attachment: pgpiWMT4yBwku.pgp
Description: PGP signature

Reply via email to