# [luatex] Luatex primitive names

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Mar 11 12:26:59 CET 2009

```On Wed, Mar 11, 2009 at 11:12:00AM +0100, Manuel Pégourié-Gonnard wrote:

> 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
>   }%
> }

Thanks.

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

The past has shown, that already \pdfoutput is too complicated.
That's my point, to make this basic stuff easy.
Also the manual would be shorter. The poor manual writer
would have to explain a complicate algorithm only to get
the version number.

Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
```