[luatex] Luatex primitive names
mpg at elzevir.fr
Mon Mar 9 19:03:03 CET 2009
Hans Hagen a écrit :
>>> Third (and this is why the above two functions are needed) starting
>>> with version 0.40, luatex in --ini mode will contain only the tex82
>>> primitives and \directlua, no extra primitives *at all*.
>> We'd have kind of a boostrap problem if \directlua wasn't included ;-)
> that's why only that one is there (and not even \luatexversion)
Btw, extra care should be taken while writing code that should be portable:
- across different version of LuaTeX
- across different TeX engines.
Before this, as a macro writer, my preferred way of detecting the underlying
engine would probably have been testing whether \luatexversion is defined. Now
I'd rather test for \directlua. *But* if some day Jonathan include Lua as a
scripting language in XeTeX, things will be more complicated.
Also, if I want to test for the LuaTeX version in order to know whether I should
use \directlua0 or \directlua, it is a bit complicated. I guess there is a
solution (no time to find it and write down the code right now) but anyway my
I think the LuaTeX manual should state clearly a recommended way of detecting
LuaTeX (and its version) so that macro writers can (hopefully) use it and no
other way that could become wrong in the future.
More information about the luatex