Re: pytex: a tex engine written in python

Joseph Wright <[email protected]> Tue, 14 Jul 2026 08:34:50 +0100
Newsgroups gmane.comp.tex.texhax
Message-ID <[email protected]>
On 13/07/2026 20:07, Junling Ma wrote:
> Hi Joseph,
>=20
> Thanks for the prompt feedback. Yes accessible PDF is currently not supp=
orted, as neither xetex nor pdftex supports them. We may implement the sup=
port by implementing necessary latex primitives, as we use reportLab under=
 the hood for generating PDF files, and that package supports accessible P=
DFs. But that might take a long time to be implemented, as I am a one-pers=
on team currently.
>=20
> For \XeTeXinterchartoks, It is not actually difficult to implement it. Y=
et, it seems to me that the purpose is to expose complex opentype kern/lig=
ature programs beyond TFM capabilities. I would prefer implement what late=
x does, feed chunks of glyphs to the font=E2=80=99s kern/ligature programs=
 until the program ends. Then we consider the resulting nodes as a single =
glyph and append it to the list. Unless you need specific controls, e.g., =
for fonts that do not support these Ker/ligature programs, maybe? The latt=
er can be done in this engine fairly easily. Maybe I misunderstood the pur=
pose of the interchar class mechanisms in XeTeX?
>=20
> Best,
> Junling

Hello Junling,

On accessibility, my point was largely that one limitation in XeTeX is=20
it doesn't make PDFs directly. A direct-PDF output route should allow=20
comparable results to pdfTeX - not as good as LuaTeX, but better than=20
nothing.

On interchartoks, LaTeX can't do anything the engine doesn't provide.=20
LuaTeX and XeTeX take very different approaches to some effects, and the=
=20
interchar mech is something that can't be done easily in Lua. So I don't=
=20
think it's a question of simply passing things to the OpenType shaper.

Regards,

Joseph