From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: MACRO calls with linebreaks? Date: Sun, 09 Aug 2009 02:40:25 +0200 Message-ID: <816D6127-7EC3-486B-846E-9A20BCCB3147@nf.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZwSj-0007xp-JV for emacs-orgmode@gnu.org; Sat, 08 Aug 2009 20:40:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZwSe-0007xK-Au for emacs-orgmode@gnu.org; Sat, 08 Aug 2009 20:40:36 -0400 Received: from [199.232.76.173] (port=49813 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZwSe-0007xH-6b for emacs-orgmode@gnu.org; Sat, 08 Aug 2009 20:40:32 -0400 Received: from mail.nf.mpg.de ([134.95.44.50]:33568) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZwSd-0006Te-N7 for emacs-orgmode@gnu.org; Sat, 08 Aug 2009 20:40:31 -0400 Received: from [192.168.178.21] (pD9E6357D.dip.t-dialin.net [217.230.53.125]) by mail.nf.mpg.de (Sun Java(tm) System Messaging Server 6.3-8.03 (built Apr 24 2009; 32bit)) with ESMTPSA id <0KO30092K37TV600@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Sun, 09 Aug 2009 02:40:42 +0200 (MEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello, I find org-mode's MACRO feature very useful for exporting to HTML as =20 it allows you to generate literally any HTML construct that you need, =20= here is a simple example: = http://www.nf.mpg.de/kinderuni/kinderuni_en.html=20 (see the "Colophon" section; thanks again to everybody from the list =20= who helped!). For another project, we need to generate a table with many (multi-=20 line) rows like this: | logo.png | somebody.jpg | name \\ telephone \\ email... | The images have different sizes (so some alignment is needed) and the =20= text in the last column should have several lines (which should be =20 next to the person's portrait). This can (currently) not been done =20 with standard org tables (I am not complaining). With something like this: #+macro: person #+HTML:
[...] {{{person(logo.png, somebody.jpg, somebody@nf.mpg.de, name
telephone
room
group
[...])}}} the problem can be solved and yet again org-mode's flexibility is =20 demonstrated. The MACRO can be hidden in a setup-file. However, the MACRO call can =20 not and it looks like a kludge and is awkward to read. MACRO calls =20 work well with few and short arguments - different from this case. The =20= problem is that org-mode seems to require the brackets in one line for =20= MACROs to work. Assuming this restriction was not there, one could =20 write in a much more readable fashion: {{{person( logo.png, somebody.jpg, somebody@nf.mpg.de, name
telephone
room
group
[...] )}}} and (just a thought) might expect white space in front of an argument =20= to be ignored and linebreaks in arguments conserved. Maybe there is a =20= better way to pass longer arguments to MACROs? Any help is appreciated. Warm regards, Stefan --=20 Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut f=FCr neurologische Forschung Gleuelerstr. 50, 50931 K=F6ln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de