[luatex] LuaTeXtra code review

Elie Roux elie.roux at telecom-bretagne.eu
Fri Mar 6 19:21:24 CET 2009


As this package may lead to a lot of discussions, here you can find the 
current code of the luatextra package. It's not totally complete yet. 
All the macros start by \lua, and the primitives are wrapped in a macro 
that starts by lua too. \directlua becomes luadirect for example.

The package works for LaTeX and plain, it loads Heiko's ifluatex.sty.

It automatically loads luamcallbacks, to enable several functions to be 
registered in a callback.

It contains \luanewattribute and \luanewcatcodetable, as well as the 
same catcodetables as in Heiko's luatex.sty. It adds a 
tex.attributenumber table to get the number of an attribute. It's useful 
for processing nodes with attributes.

It contains module loading functions, named \luaUseModule and 
\luaRequireModule, with the corresponding lua functions 
luatextra.use_module and luatextra.require_module. They have the same 
kind of behaviour as LaTeX with packages.

I also defined some lua functions for packages to use, like module_info, 
module_log, module_warning or module_error.

I added the following macros :
\def\LuaTeX{Lua\TeX }
\def\LuaLaTeX{Lua\LaTeX }

I hesitated with \textsc{Lua}\TeX in LaTeX, but it seems unlogical, as 
the LuaTeX manual doesn't use small capitals.

The next steps are : improving the catcodetable code, and defining a 
LaTeX evironment that executes pure lua code, with the good catcodes (it 
won't expand macros nor macro arguments), called luaverb.

Thank you in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: luatextra.zip
Type: application/zip
Size: 5499 bytes
Desc: not available
Url : http://tug.org/pipermail/luatex/attachments/20090306/6eee1792/attachment.zip 

More information about the luatex mailing list