[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot typeset tmac/groff_mdoc.n
From: |
Krzysztof Żelechowski |
Subject: |
Re: Cannot typeset tmac/groff_mdoc.n |
Date: |
Sat, 29 May 2010 17:33:11 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
Dnia środa, 26 maja 2010 o 15:36:15 Gaius Mulley napisał(a):
> Werner LEMBERG <address@hidden> writes:
> > For this reason grohtml is still tagged as `beta code'.
I have a demo of a system that retains structural information and generates
HTML from XML.
The demo starts with a modified doc.tmac that inserts custom tags of the form
"x X x:TAG" into the output. I process it with gtroff -Z and a custom sed
script. The script extracts the tags and text and kills everything else,
producing a valid XML source. This XML is not very pretty or semantic but it
lends itself to further processing. As a last step, I get good HTML. In
particular, the source that I reported to break -Thtml flies.
Please let me know if you are interested in looking at the demo. Of course,
my target is not to match the beauty or accuracy of Postscript output;
instead, my target is to generate structured and valid HTML that is readable
(because the result of -Thtml is not always readable). The system is intended
specifically to go with -mandoc; any other macro package would need a
similarly customized one, although the principle is fairly generic. The
strength of this method, as compared with doclifter, is that it uses the
existing groff engine to parse and process source text.
Cheers,
Chris