Re: pytex: a tex engine written in python
Joseph Wright <[email protected]> Mon, 13 Jul 2026 11:30:34 +0100
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <[email protected]> |
On 13/07/2026 08:15, Junling Ma wrote: > Hi all, >=20 > I've been working (with plenty of help from Codex) on a very preliminary= TeX engine in Python called pytex, currently available on GitHub at rover= robot/pytex. It is built around a modular architecture to make it easier t= o extend in areas such as safe \write18 support, \special handling, font h= andling, and additional output backends such as HTML and DOCX. It supports= Unicode out of the box. The parser itself supports incremental parsing an= d introspection, so it can be incorporated into other tools. In addition, = the architecture is intended to support concurrent parser instances (more = work is needed though). >=20 > The current focus is compatibility with existing TeX/LaTeX documents rat= her than performance. At the moment, it implements enough of pdfTeX and Xe= TeX to run the LaTeX2=CE=B5 engine, and it can produce DVI, XDV, PDF, SVG,= HTML, and DOCX output. Since this is still at a very early stage, it is q= uite slow, does not yet support the TeX format dump files (it uses a compr= essed JSON format instead), does not support bidirectional text, and curre= ntly requires an existing TeX Live installation. I'm also sure there are m= any bugs and missing features. My hope, however, is that the overall archi= tecture is flexible enough to make future extensions straightforward. >=20 > If you're interested, I'd be very grateful for feedback. You are also ve= ry welcome to contribute. >=20 > Best, > Junling Ma Hello Junling, Looks interesting. With XeTeX essentially unmaintained, this could be a=20 path for users to migrate to something with updates possible (though=20 accessible PDFs likely remain more realistic with LuaTeX). Have you=20 considered adding \XeTeXinterchartoks support? Regards, Joseph