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