[luatex] Luatex primitive names

Taco Hoekwater taco at elvenkind.com
Tue Mar 10 09:13:40 CET 2009


Hi Manuel,

Manuel Pégourié-Gonnard wrote:
> Btw, extra care should be taken while writing code that should be portable:
> - across different version of LuaTeX
> - across different TeX engines.

For that, I assume it would be better if luatex exposed \luatexversion
by default also? Fine by me, just make up your collective mind and let
me know if that makes more sense.

I personally don't care much about what exactly is part of the --ini,
I only ever use context, and there luatex will be enabled in the core
format for sure. Just reach a conclusion together in the next few
days and let me know the result.

> 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
> point is:

> 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.

Defining a detection mechanism has now become the format authors
territory: disabling/enabling luatexs extra primitives should be done
either by the format itself, or by some base format package that
everybody that uses that format agrees on.

I(We) won't mind adding a paragraph to the manual (and this new way of
handling primitives needs explaining in "section one" for sure) but
how to deal the runtime detection for the (lua)(pdf)latex format in
practice is not a decision I want to make, nor think about.

Just make up your minds among yourselves, and if at the end someone
writes me a paragraph, I'll happily include it in the manual.

Best wishes,
Taco


More information about the luatex mailing list