latex3 / xpdftex

Experiments in emulating pdftex
LaTeX Project Public License v1.3c
5 stars 1 forks source link

xpdftex

Experiments in emulating pdftex

This is a sketch of configuring luatex to be closer to pdftex to allow legacy pdflatex documents to be processed while still accessing internals via Lua for PDF Tagging, MathML or other reasons.

Some differences in formatting may still exist (different underlying hyphenation mechanism, and some more obscure pdftex extensions are harder to emulate).

Test documents and other documents explicitly testing definitions with \meaning or \ifprimitive can detect the emulation, but most "normal" documents should (eventually) work without error.

luatex is mostly hidden so that packages such as graphics/hyperref etc will choose a pdftex back end. The command \@@!directlua is available as a back door to Lua (and from there you can use tex.enableprimitives to access any luatex functionality).

Sources

Partially implemented

NOT DONE

Usage (without installing)

luatex -ini xpdflatex.ini

should make a xpdflatex.fmt format and

luatex \&xpdflatex test-latin-latin1.tex

should process an example document.

Integration into TeXLive

The -dev version is optional, and instead of the engine luahbtex one could use luatex (currently unclear which is better).

fmtutil-sys --byfmt xpdflatex
fmtutil-sys --byfmt xpdflatex-dev

The commands xpdflatex and xpdflatex-dev should then be available.