On 10-3-2010 13:50, Thomas A. Schmitz wrote:
That's a very interesting question. Hans has this intriguing paragraph in the older manual, example.pdf: "In ConTEXt we use a strange but charming way to handle this conversion: we simply typeset xml. The typeset document (with lots of angle brackets) is then converted into raw text. A complication is math, but given that you can embed MathML in your document, this can be passed on directly." The question how this can be done has been asked several time on the list, but so far, I haven't seen an answer. Maybe you need to buy Hans lots of beer at the next ConTeXt meeting, and he will finally fess up!
\def\chapter#1{\par<h1>#1</h1>\par} \def\bTABLE{\par<table>\crlf} \def\eTABLE{</table>\par} \def\bTR{<tr>} \def\eTR{</tr>\crlf} \def\bTD{<td>} \def\eTD{</td>} \prependtoks <html><body>\to\everystarttext \prependtoks</body><html>\to\everystoptext \setupwhitespace[line] \setuplayout [page] \setupbodyfont [tt] % 1pt \starttext \chapter{First} \input tufte \chapter{Second} \input tufte \bTABLE \bTR \bTD test \eTD \eTR \eTABLE \stoptext and then pdftotext on the result but it's sort of a joke (some day i will cook up a nice mkiv variant which does not demand redefinitions) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------