emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: my-mini-table(something)


From: Matthew Lundin
Subject: [Orgmode] Re: my-mini-table(something)
Date: Thu, 18 Jun 2009 07:25:02 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

Hi Stefan,

Stefan Vollmar <address@hidden> 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: <table><tr><td><img src="./images/icon.png"/></
> td><td<code>something</code></td></tr></table>
>
> #+HTML: <table><tr><td><img src="./images/icon.png"/></
> td><td<code>other</code></td></tr></table>
>
> 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: <table><tr><td><img 
src="./images/icon.png"/></td><td<code>something</code></td></tr></table>
--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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]