SV: [DOC-SIG] Comparing SGML DTDs

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Thu, 13 Nov 1997 11:21:18 -0500


Paul Prescod writes:
 > >From (La)TeX? Not really. Parsing LaTeX is not only difficult, but
 > relatively undefined. There is no one language called "LaTeX" it is
 > really a family of languages more or less defined by the Lamport book.

  Python at one point (fairly recently) included a script that
converted LaTeX from the library reference to texinfo, so it's
actually not too painful as measured in development time, but would
need to be manually fixed up afterwards.  I'd expect this to be a
one-time-only conversion, but a tool is probably the right way to do
it.  The library reference is mostly pretty well structured.

 > And lots of LaTeX documents mix generic structures and formatting
 > interchangably. Finally, there is no easy way to figure out how to
 > handle macros. Should they be expanded to their TeX primitives (uck)? If
 > not, how do we know how to represent user defined macros in the target
 > DTD? If you make a "foobar" macro, what do I do with it in SGML?

  In the Python documentation, macro definitions are largely reserved
for the mystyle.sty file, and everything else uses those macros.  So
it's much less adhoc than general LaTeX.  I don't expect a general
tool for TeX->SGML can be developed in a finit time.  I certainly have 
no intention to try!


  -Fred

--
Fred L. Drake, Jr.
fdrake@cnri.reston.va.us
Corporation for National Research Initiatives
1895 Preston White Drive
Reston, VA    20191-5434

_______________
DOC-SIG  - SIG for the Python Documentation Project

send messages to: doc-sig@python.org
administrivia to: doc-sig-request@python.org
_______________