Some thoughts on a ground-up remake of LaTeX
William F Hammond
hmwlfsr at yahoo.com
Sat Nov 6 20:12:24 CET 2021
Dear Don Hosek and all:
What Don has described is pretty much what has been done in
GELLMU (http://www.albany.edu/~hammond/gellmu) during the
time since 1998. (There's also support/gellmu at CTAN,
which is slightly behind the website but I don't want to
update it without further testing.)
As with what Don describes, there is no involvement of
TeX the engine (or pdftex or xetex ...) unless and until
such an engine is used in typesetting XML. The namespace
for input commands is entirely separate from anything that
a TeX engine might ever see.
Don writes:
> As David says, this is a ground-up language. By separation
> of concerns there’s a good possibility to manage some
> interesting use cases. The architecture is not unlike a
> contemporary compiler in that the parsing is done to an
> intermediate representation which will then be converted to
> the final output,
In gellmu's "advanced mode" with maximal LaTeX resemblance
the intermediate representation is XML. Each of the
non-alphanumeric but printable ASCII characters becomes an
empty element in GELLMU's article document type so that
choices are available for subsequent processing.
In gellmu's "basic mode" -- except for use of \newcommand --
one is really writing in the vocabulary of a specified XML
document type (or it can be SGML (or HTML5^*, which is
neither SGML nor XML)) directly using a simple LaTeX-like
syntax.
> but this means that, for example, someone
> could plug a XML parser into the front end and use all of
> the back-end capabilities for typesetting. There will be
> multiple back ends allowing the same file to reliably target
> output to PDF, HTML/ePub, XML+MathML or even InDesign or
> Word.
Yes, this is the design with GELLMU when the designated XML
document type chosen is suitable.
Unicode can be used though the present defaults need
adjustment for its use.
Processing from LaTeX-like source to XML (or SGML) is done
using the GNU Emacs lisp engine. Processing beyond that to
other *ML formats and to actual LaTeX for print typesetting
is done with Perl.
-- Bill
Email: hmwlfsr at yahoo.com
gellmu at gmail.com
https://www.facebook.com/william.f.hammond
http://www.albany.edu/~hammond/
*So long as one avoids HTML5's "transparent content model".
More information about the texhax
mailing list.