[luatex] macros to invoke lua in LaTeX

Hans Hagen pragma at wxs.nl
Thu Mar 5 12:03:04 CET 2009

Will Robertson wrote:

> I'm not suggesting this seriously, but you could prefix new primitives 
> with chars that are usually "other"  to dramatically lower the chances 
> of a clash. E.g.,  \^scantextokens, \^directlua, and whatever.

each macro package has its own usage of prefixes so that would not solve 
the problem; of course one can remap primitives quite early after 
loading so


and when in macro package xyz this is agreed upon it also avoids 
discussions at the engine dev level

also, prefixing with \@reserved at scantextokens or whatever is rather safe 
too (and efficient)

any namespace switching mechanism would bring its own problems (mixed 
namespaces, more code, clashes too); it's all about managaging code and 
the only way out there is clear rules forusers that want to extend a 
macro package

>> Actual known clashes are a different issue, and we do try quite hard
>> to avoid such names: for example, luatex will never get \begin as a
>> new primitive.
> Are you aware, Karl, of any namespace collisions that have already 
> occured? I do understand your concern, but I imagine that only a very 
> small number of old documents will be affected by the LuaTeX primitives.

well, i myself ran into it several times -)

also, users redefining primitives are out of anyones control -)


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the luatex mailing list