On Sat, 6 Nov 2010, Manfred Lotz wrote:
I'm in a situation where I have to do some documentation which should be available in html and rtf/odt (would be nice to have).
There is an experimental feature of converting ConTeXt to XML. You can then process XML using standard XML tools to get HTML.
I do not need any fancy stuff, just simple things: ordered, unordered lists, verbatim, tables etc.
\setupbackend[export=yes]
\starttext
\section{Some section}
\startitemize[1] \item bla bla \stopitemize
\stoptext
Run "context filename". This will create a filename.export file in your current directory that looks like this: <?xml version='1.0' standalone='yes' ?> <!-- input filename : back --> <!-- processing date : Sat Nov 6 16:55:02 2010 --> <!-- context version : 2010.10.14 13:14 --> <!-- exporter version : 0.10 --> <document language='en' file='back' date='Sat Nov 6 16:55:02 2010' context='2010.10.14 13:14' version='0.10'> <section detail='section'> <sectionnumber>1</sectionnumber> <sectiontitle>Some section</sectiontitle> <sectioncontent> <itemgroup detail='itemize' symbol='1'> <item> <itemtag><math><mrow><mo>•</mo></mrow></math></itemtag> <itemcontent>bla bla</itemcontent> </item> </itemgroup> </sectioncontent> </section> </document>
work for ConTeXt and then I would like to know what other alternatives I have. Also regarding rtf or/and odt.
Since you do not need any fancy features, a simpler option is to use markdown as your starting format and use pandoc to convert it to context, html, and odt. However, creating even slightly complicated tables in markdown is a pain, unless your editor supports an ascii table mode. Aditya