From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: Re: my-mini-table(something) Date: Thu, 18 Jun 2009 13:40:41 +0200 Message-ID: References: <53831.25060.qm@web28311.mail.ukl.yahoo.com> 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 1MHFzC-0002Aj-Ha for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 07:40:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHFz6-00028p-Rz for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 07:40:54 -0400 Received: from [199.232.76.173] (port=42641 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHFz6-00028e-Kv for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 07:40:48 -0400 Received: from mail.nf.mpg.de ([134.95.44.50]:36315) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHFz5-0004Yo-Qz for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 07:40:48 -0400 Received: from [192.168.178.21] (pD9E63C71.dip.t-dialin.net [217.230.60.113]) by mail.nf.mpg.de (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0KLF005JVNA34P00@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 13:44:28 +0200 (MEST) In-reply-to: <53831.25060.qm@web28311.mail.ukl.yahoo.com> 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 Dear Giovanni, excellent, many thanks! #+MACRO is exactly what I was looking for. (1) The release notes of 6.27 say: > Macro processing for export has been enhanced: > > - You can use =20 arguments in a macro, for example > #+macro hello Greet the $1: Hello $1 which is just what I had been hoping for! This important change has =20 not yet made it into org.pdf of the 6.27a distribution. Obviously, =20 this gives you maximum flexibility even for more complex documents and =20= should get due emphasis in the documentation. (2) The next logical step is to collect a number of useful macros in =20 one include file. However, when I use #+INCLUDE: "./include.org" which contains the MACRO, the macro expansion does not work (if the =20 same MACRO statements are part of the org-file where I use them, they =20= work just fine), all other org content is included as expected. Is =20 this is a bug? Warm regards, Stefan On 18.06.2009, at 12:14, Giovanni Ridolfi wrote: > > --- Gio 18/6/09, Stefan Vollmar ha scritto: >> >> For one project, I used several statements like this >> (simplified): >> >> #+HTML: something> table> >> >> #+HTML:
> src=3D"./images/icon.png"/>
other
> src=3D"./images/icon.png"/>
= >> >> The result looks exactly the way we have planned it, >> however, ideally one would want to write: >> >> \my-mini-table(something) >> \my-mini-table(other) >> > > + you can use yasnippet > > http://code.google.com/p/yasnippet/ > http://doc.norang.ca/org-mode.html#sec-15.1 > > > + Or macros? manual, chapter 12.1 Markup rules > > Macro replacement > ----------------- > > You can define text snippets with > > #+MACRO: name replacement text > > which can be referenced anywhere in the document (even in code > examples) with `{{{name}}}'. > > > #+MACRO: my-mt-sth #+HTML: something
src=3D"./images/=20 > icon.png"/>
> > > cheers > Giovanni > > > > --=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