[luatex] Luatex primitive names

Manuel Pégourié-Gonnard mpg at elzevir.fr
Wed Mar 11 11:12:00 CET 2009


Heiko Oberdiek a écrit :
> Thus the syntax change for \directlua (and perhaps later
> changes) vote for something extra:
> \luatexversion is a good choice in my opinion.

One can also think of the following compromise: continue exposing \luatexversion
as long as the \directlua syntax is not stable. Then expose only \directlua. So
on can use (pseudo-code)

\IfDefined{directlua}{%
  \IfDefined{luatexversion}{%
    % use \luatexversion
  }{%
    \directlua{%
    % or whatever the stable syntax of \directlua is
    if tex.luatexversion == nil then
      -- not running LuaTeX
    else
      -- use tex.luatexversion
    end
  }%
}

> It says in my eyes, `hey, I provide the features, described
> in the LuaTeX manual for the version number I return'.
> This is a clean way for testing without the need to use some
> complicate dubious heuristics.
> 
The above way be a bit more complicated than one could wish, but at least it's
not heuristic.

Manuel.



More information about the luatex mailing list