[luatex] do pdftex extensions work?

Taco Hoekwater taco at elvenkind.com
Thu Jul 15 13:05:00 CEST 2010


bulia byak wrote:
> Hi all,
> I have a LaTeX document using various pdftex extensions. From what I 
> could gather in the manual, they should work with luatex. I used 
> beta-0.60.2-2010070511 thus:
> What am I missing?

Straight from the reference manual:

>From day one, LuaTEX has offered extra functionality when compared to
the superset of pdfTEX and Aleph. That has not been limited to the
possibility to execute lua code via \directlua, but LuaTEX
also adds functionality via new TEX-side primitives.

However, starting with beta 0.39.0, most of that functionality is hidden
by default. When LuaTEX 0.40.0 starts up in `iniluatex' mode (luatex
-ini), it defines only the primitive commands known by TEX82 and the one
extra command \directlua.

As is fitting, a lua function has to be called to add the extra
primitives to the user environment. The simplest method to get access to
all of the new primitive commands is by adding this line to the format
generation file:

\directlua { tex.enableprimitives('',tex.extraprimitives()) }

But be aware, that the curly braces may not have the proper \catcode
assigned to them at this early time (giving a 'Missing number' error),
so it may be needed to put these assignments

\catcode `\{=1
\catcode `\}=2

before the above line. More fine-grained primitives control is possible,
you can look the details in section 4.12.11. For simplicity's sake, this
manual assumes that you have executed the \directlua command as given above.

Best wishes,

More information about the luatex mailing list