Hello,
I find org-mode's MACRO feature very useful for exporting to HTML as
it allows you to generate literally any HTML construct that you need,
here is a simple example: http://www.nf.mpg.de/kinderuni/kinderuni_en.html
(see the "Colophon" section; thanks again to everybody from the list
who helped!).
For another project, we need to generate a table with many (multi-
line) rows like this:
| logo.png | somebody.jpg | name \\ telephone \\ email... |
The images have different sizes (so some alignment is needed) and the
text in the last column should have several lines (which should be
next to the person's portrait). This can (currently) not been done
with standard org tables (I am not complaining).
With something like this:
#+macro: person #+HTML: <table><tr><td style="vertical-
align:middle;margin-right:2em;margin-left:2em;padding:5px;">[...]</
table>
{{{person(logo.png, somebody.jpg, someb...@nf.mpg.de, name<br/
>telephone<br/>room<br/>group<br/>[...])}}}
the problem can be solved and yet again org-mode's flexibility is
demonstrated.
The MACRO can be hidden in a setup-file. However, the MACRO call can
not and it looks like a kludge and is awkward to read. MACRO calls
work well with few and short arguments - different from this case. The
problem is that org-mode seems to require the brackets in one line for
MACROs to work. Assuming this restriction was not there, one could
write in a much more readable fashion:
{{{person(
logo.png, somebody.jpg,
someb...@nf.mpg.de,
name<br/>
telephone<br/>
room<br/>
group<br/>
[...]
)}}}
and (just a thought) might expect white space in front of an argument
to be ignored and linebreaks in arguments conserved. Maybe there is a
better way to pass longer arguments to MACROs?
Any help is appreciated.
Warm regards,
Stefan
--
Dr. Stefan Vollmar, Dipl.-Phys.
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213 FAX +49-221-4726-298
Tel.: +49-221-478-5713 Mobile: 0160-93874279
Email: voll...@nf.mpg.de http://www.nf.mpg.de
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode