emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Stefan Vollmar <vollmar@nf.mpg.de>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: MACRO calls with linebreaks?
Date: Mon, 10 Aug 2009 10:09:58 +0200	[thread overview]
Message-ID: <E9D0A9E4-8E7D-4B1A-B90B-248B5335F29C@gmail.com> (raw)
In-Reply-To: <816D6127-7EC3-486B-846E-9A20BCCB3147@nf.mpg.de>

Hi Stefan,

this should now work.

But note that the opening parenthesis must be attached to the macro  
name and the closing parenthesis must be attached to the "}}}", just  
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  
> 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, somebody@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,
> somebody@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: 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

  reply	other threads:[~2009-08-10  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09  0:40 MACRO calls with linebreaks? Stefan Vollmar
2009-08-10  8:09 ` Carsten Dominik [this message]
2009-08-10 22:58   ` Stefan Vollmar
2009-08-11  9:02     ` Carsten Dominik
2009-08-11 13:30     ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E9D0A9E4-8E7D-4B1A-B90B-248B5335F29C@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=vollmar@nf.mpg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).