[Doc-SIG] Python docs in reST

Torsten Bronger bronger at physik.rwth-aachen.de
Fri May 27 14:51:08 CEST 2005


Hallöchen!

Martin Blais <martin.blais at gmail.com> writes:

> [...]
>
> about tbook: interesting idea, but with XML as input, a severe
> limitation is that you can't extend and create macros for your
> specific document.  that is a really powerful part of LaTeX.  do
> you allow people to somehow provide files to do create new element
> types?

Yes, this is done via "customisation layers" in XSLT.  If you know
XSLT, it's pretty easy an elegant.  (Not my idea, but DocBook's.)

> on a different note: something that would have great value (and
> tremendous hacker brownie points) is for someone to tap deep into
> LaTeX and to provide its internal representation in Python or XML
> to do its output...  there is pdflatex, (ps)latex, wondering if
> someone could produce xmllatex?  (like, write a latex-to-xml
> translator)

This is done by TeX4ht in a quite clever way: It deploys lots of
hooks in the dvi file and processes it, which means that it needn't
muck about the LaTeX syntax with all its quirks.

There is no "internal representation" I'm afraid.  Therefore,
transforming LaTeX to high-structure formats is -- according to a
common saying in a TeX newsgroup -- like making potatoes out of
chips.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus



More information about the Doc-SIG mailing list