From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: MACRO calls with linebreaks? Date: Mon, 10 Aug 2009 10:09:58 +0200 Message-ID: References: <816D6127-7EC3-486B-846E-9A20BCCB3147@nf.mpg.de> Mime-Version: 1.0 (Apple Message framework v936) 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 1MaPxO-0007c5-UC for emacs-orgmode@gnu.org; Mon, 10 Aug 2009 04:10:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaPxK-0007bt-Gj for emacs-orgmode@gnu.org; Mon, 10 Aug 2009 04:10:14 -0400 Received: from [199.232.76.173] (port=36192 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaPxK-0007bq-1U for emacs-orgmode@gnu.org; Mon, 10 Aug 2009 04:10:10 -0400 Received: from mx20.gnu.org ([199.232.41.8]:25839) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaPxI-0005le-7u for emacs-orgmode@gnu.org; Mon, 10 Aug 2009 04:10:09 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MaPxC-0000Bm-6O for emacs-orgmode@gnu.org; Mon, 10 Aug 2009 04:10:02 -0400 Received: by ewy7 with SMTP id 7so3087153ewy.42 for ; Mon, 10 Aug 2009 01:10:01 -0700 (PDT) In-Reply-To: <816D6127-7EC3-486B-846E-9A20BCCB3147@nf.mpg.de> 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: Stefan Vollmar Cc: emacs-orgmode Hi Stefan, this should now work. But note that the opening parenthesis must be attached to the macro =20 name and the closing parenthesis must be attached to the "}}}", just =20 as you have done in your proposal. I have not tested this, please verify. - Carsten On Aug 9, 2009, at 2:40 AM, Stefan Vollmar wrote: > 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 =20 > need, 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 =20 > list 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 =20 > the text in the last column should have several lines (which should =20= > be next to the person's portrait). This can (currently) not been =20 > done with standard org tables (I am not complaining). > > With something like this: > > #+macro: person #+HTML:
align:middle;margin-right:2em;margin-left:2em;padding:5px;">[...] table> > > {{{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. =20 > The problem is that org-mode seems to require the brackets in one =20 > line for MACROs to work. Assuming this restriction was not there, =20 > one could 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 =20 > argument to be ignored and linebreaks in arguments conserved. Maybe =20= > there is a 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 > > > > > > > > _______________________________________________ > 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