Given that the universal format-to-format translator Pandoc is coming of age, LaTeX authors are tempted to think that whatever LaTeX they write can quickly be translated without worry to whatever other format may be required.
Of course, that is not exactly true, but the use of an XML profile of LaTeX can make it exactly true. However, an SGML profile of LaTeX can provide closer emulation of classical LaTeX than an XML profile.
Most actors in the world of markup have restricted their use of SGML to XML. For that reason software that handles SGML beyond the realm of XML seems to be falling out of maintenance. If the LaTeX community wishes to continue to be able to avail itself of the advantages of SGML for LaTeX source emulation, it may fall on the LaTeX community to maintain the extant SGML libraries.
Big investment in writing.
Want maximally useful documents.
Do not want to re-edit for different views.
Robust translation to whatever.
Powerful source: use a LaTeX profile.
A dialect of LaTeX with a fixed command vocabulary where all macro expansions must be effective in that vocabulary.
A language essentially equivalent to an SGML document type with a canonical XML shadow.
For the concept of LaTeX profile see my talk on the 1000002-th anniversary of TUG in 2010: https://tug.org/TUGboat/tb31-2/tb98hammond.pdf
The XML guise of a LaTeX profile can be styled with CSS. See my talk at TUG 2014: https://tug.org/TUGboat/tb35-2/tb110hammond.pdf
|
With the GELLMU didactic production system in “regular” mode, a benchmark for LaTeX profiles, there are two different choices of generalized LaTeX markup.
An HTML-style table written in generalized LaTeX:
The corresponding XML:
The usual way of writing source for a LaTeX tabular environment uses “&” and “\\” as markdown.
The corresponding XML:
Like XML, SGML is a grammar for markup languages.
XML has stricter rules than SGML.
XML comes under SGML.
XML requires less infra-structure than full SGML.
An SGML document must always include or reference a formal document type definition.
XML is SGML dumbed-down for use across the web.
An XML document can usually be styled for presentation with CSS.
A C++ library for parsing and transforming SGML documents.
Spawned from James Clark's SP.
Before XML, Clark's SP was dominant.
OpenSP can be used with XML documents.
XML libraries can only be used with SGML documents after they have been transformed to XML.
A somewhat steeper learning curve.
Seldom visible in public.
Who knows what happens behind closed doors.
BUT:
OpenSP only supports the basic multilingual plane of Unicode (U+0000 – U+FFFF).
Adding full Unicode support to OpenSP might be a good master's thesis project.
With Pandoc the “power” of one's original document is limited both by the source format and Pandoc's central exchange format.
With an original document that is equivalent to a document within an SGML or XML document type its “power” is limited only by the document type.
By “power” one should understand the number of potential destination formats that are robustly reachable