From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Vollmar Subject: my-mini-table(something) Date: Thu, 18 Jun 2009 11:56:57 +0200 Message-ID: <28CF207F-50F8-4F14-8787-F99E5BC2369C@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 1MHEMl-0007qW-FF for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 05:57:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHEMe-0007po-V8 for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 05:57:05 -0400 Received: from [199.232.76.173] (port=36851 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHEMe-0007pl-NH for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 05:57:00 -0400 Received: from mail.nf.mpg.de ([134.95.44.50]:35661) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHEMe-0001o2-7P for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 05:57:00 -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 <0KLF005GGIH84P00@mail.nf.mpg.de> for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 12:00:44 +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, we have used org-mode for creating HTML content for software =20 documentation and it beats everything we have tried over the last =20 couple of years hands down, excellent work! For one project, I used several statements like this (simplified): #+HTML:
something
#+HTML:
other
The result looks exactly the way we have planned it, however, ideally =20= one would want to write: \my-mini-table(something) \my-mini-table(other) (with a suitable syntax) in the org source, and this should only be =20 expanded when exporting the document, so I never need to look at the =20 HTML code (if I do not want to). This is probably already possible with org-mode using the html-export-=20= hook and a little Lisp function. Many thanks in advance for any hints! 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: my-mini-table(something) Date: Thu, 18 Jun 2009 07:25:02 -0500 Message-ID: References: <28CF207F-50F8-4F14-8787-F99E5BC2369C@nf.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHGg7-000854-0s for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 08:25:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHGfy-00082X-RO for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 08:25:12 -0400 Received: from [199.232.76.173] (port=60726 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHGfx-000826-2s for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 08:25:05 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:57202) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHGfw-0003np-Po for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 08:25:04 -0400 In-Reply-To: <28CF207F-50F8-4F14-8787-F99E5BC2369C@nf.mpg.de> (Stefan Vollmar's message of "Thu\, 18 Jun 2009 11\:56\:57 +0200") 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, Stefan Vollmar writes: > we have used org-mode for creating HTML content for software > documentation and it beats everything we have tried over the last > couple of years hands down, excellent work! > > For one project, I used several statements like this (simplified): > > #+HTML:
td>something
> > #+HTML:
td>other
> > 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) > > (with a suitable syntax) in the org source, and this should only be > expanded when exporting the document, so I never need to look at the > HTML code (if I do not want to). Perhaps the easiest way to do this would be to define a macro at the top of your org file: --8<---------------cut here---------------start------------->8--- #+MACRO: special-table #+HTML: something
--8<---------------cut here---------------end--------------->8--- Then, any time you wanted the html snippet to appear in the export, you could place the following in your org file: {{{special-table}}} During export this will be replaced by the definition above. (At first I wasn't sure this would work because of the extra comment notation in the macro definition, but I tested it and it seemed to work fine.) For more information on macros, see http://orgmode.org/org.html#Macro-replacement Regards, Matt From mboxrd@z Thu Jan 1 00:00:00 1970 From: giovanni.ridolfi@yahoo.it Subject: Re: Re: my-mini-table(something) Date: Thu, 18 Jun 2009 13:11:20 +0000 (GMT) Message-ID: <377224.40522.qm@web28315.mail.ukl.yahoo.com> Reply-To: giovanni.ridolfi@yahoo.it Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHHOm-0007UZ-Jo for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 09:11:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHHOk-0007S7-VS for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 09:11:24 -0400 Received: from [199.232.76.173] (port=55923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHHOk-0007Rx-MM for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 09:11:22 -0400 Received: from web28315.mail.ukl.yahoo.com ([87.248.110.134]:48865) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MHHOk-0002pg-7G for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 09:11:22 -0400 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 , Stefan Vollmar , Carsten Dominik --- Gio 18/6/09, Stefan Vollmar ha scritto:=0A> #+MACRO= is exactly what I was looking for.=0A> =0A> (1) The release notes of 6.27 = say:=0A> > Macro processing for export has been enhanced: =0A> > - You can = use arguments in a macro, for example =0A> #+macro hello Greet the $1: Hell= o $1=0A> which is just what I had been hoping for! This important=0A> chang= e has not yet made it into org.pdf of the 6.27a=0A> distribution. =0A=0A???= ? really ?????=0A=0Aat page 106 of the pdf version, that you can download f= rom the site,=0Ahttp://orgmode.org/org.pdf=0A=0AI can read: "Macro replacem= ent"!=0A=0A> (2) The next logical step is to collect a number of useful=0A>= macros in one include file. However, when I use=0A> #+INCLUDE: "./include.= org"=0A> which contains the MACRO, the macro expansion does not work=0A> (i= f the same MACRO statements are part of the org-file where=0A> I use them, = they work just fine), all other org content is=0A> included as expected. Is= this is a bug?=0A=0AI think this is a not, yet?, implemented feature ;-)= =0A=0A*Macro processing* is intended *for export* (release notes)=0Aso, I t= hink, Carsten considered only the macros in the =0Acurrent file/buffer.=0A= =0Acheers,=0AGiovanni=0A=0A=0A From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: my-mini-table(something) Date: Fri, 19 Jun 2009 02:19:28 +0200 Message-ID: <873a9xcbxr.fsf@bzg.ath.cx> References: <28CF207F-50F8-4F14-8787-F99E5BC2369C@nf.mpg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHRpY-0001J4-QV for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 20:19:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHRpT-0001CB-PX for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 20:19:44 -0400 Received: from [199.232.76.173] (port=60893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHRpT-0001BW-Er for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 20:19:39 -0400 Received: from ey-out-1920.google.com ([74.125.78.148]:23296) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHRpQ-0003Qe-UT for emacs-orgmode@gnu.org; Thu, 18 Jun 2009 20:19:37 -0400 Received: by ey-out-1920.google.com with SMTP id 3so142496eyh.24 for ; Thu, 18 Jun 2009 17:19:35 -0700 (PDT) In-Reply-To: (Matthew Lundin's message of "Thu, 18 Jun 2009 07:25:02 -0500") 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: Matthew Lundin Cc: emacs-orgmode Matthew Lundin writes: > #+MACRO: special-table #+HTML: something
Note that you can also use a variable in your macro: #+MACRO: special-table #+HTML: $1
{{{special-table(something)}}} PS: this is not yet documented in the manual. -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: my-mini-table(something) Date: Fri, 19 Jun 2009 08:06:44 +0200 Message-ID: <27801724-7DCC-4D39-9B96-1576EEF1C452@gmail.com> References: <28CF207F-50F8-4F14-8787-F99E5BC2369C@nf.mpg.de> <873a9xcbxr.fsf@bzg.ath.cx> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHY2w-0008AI-JD for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 02:57:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHY2s-00087s-58 for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 02:57:58 -0400 Received: from [199.232.76.173] (port=56318 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHY2s-00087m-1q for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 02:57:54 -0400 Received: from mx20.gnu.org ([199.232.41.8]:12447) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHY2r-00042n-EW for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 02:57:53 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHY2q-0001MD-Od for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 02:57:52 -0400 Received: by ewy6 with SMTP id 6so2087580ewy.42 for ; Thu, 18 Jun 2009 23:57:51 -0700 (PDT) In-Reply-To: <873a9xcbxr.fsf@bzg.ath.cx> 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: Bastien Cc: Matthew Lundin , emacs-orgmode On Jun 19, 2009, at 2:19 AM, Bastien wrote: > Matthew Lundin writes: > >> #+MACRO: special-table #+HTML: something
> > Note that you can also use a variable in your macro: > > #+MACRO: special-table #+HTML: $1
> > {{{special-table(something)}}} > > PS: this is not yet documented in the manual. It is now. Thanks. - Carsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: my-mini-table(something) Date: Fri, 19 Jun 2009 11:44:45 +0200 Message-ID: <87eitga776.fsf@bzg.ath.cx> References: <28CF207F-50F8-4F14-8787-F99E5BC2369C@nf.mpg.de> <873a9xcbxr.fsf@bzg.ath.cx> <27801724-7DCC-4D39-9B96-1576EEF1C452@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHaeb-0003Mp-JW for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 05:45:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHaeW-0003Jl-SL for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 05:45:00 -0400 Received: from [199.232.76.173] (port=53863 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHaeW-0003Jc-Is for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 05:44:56 -0400 Received: from mail-ew0-f210.google.com ([209.85.219.210]:57830) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHaeW-0007r9-05 for emacs-orgmode@gnu.org; Fri, 19 Jun 2009 05:44:56 -0400 Received: by ewy6 with SMTP id 6so2186514ewy.42 for ; Fri, 19 Jun 2009 02:44:52 -0700 (PDT) In-Reply-To: <27801724-7DCC-4D39-9B96-1576EEF1C452@gmail.com> (Carsten Dominik's message of "Fri, 19 Jun 2009 08:06:44 +0200") 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: Carsten Dominik Cc: Matthew Lundin , emacs-orgmode Carsten Dominik writes: >> PS: this is not yet documented in the manual. > > It is now. Thanks. Thanks :) -- Bastien