[NTG-context] LuaJitTeX, \texenginename, and \texengineversion

Kip Warner kip at thevertigo.com
Thu May 9 02:26:22 CEST 2013


On Wed, 2013-05-08 at 09:32 +0200, luigi scarso wrote:
> On Wed, May 8, 2013 at 2:49 AM, Kip Warner <kip at thevertigo.com> wrote:
> 
> > Hey Luigi,
> >
> > I find the \texenginename and \texengineversion useful for retrieving
> > the backend name and version. They work fine when using the vanilla
> > LuaTeX backend. However, when using LuaJitTeX, the aforementioned
> > macros still seem to retrieve LuaTeX specific information and not
> > LuaJitTeX - unless I'm doing something wrong. I was careful to ensure I
> > passed --engine=luajittex to context as well.
> >
> > --
> > Kip Warner -- Software Engineer
> > OpenPGP encrypted/signed mail preferred
> > http://www.thevertigo.com
> >
> 
> yes, it's known and it's ok, because luajittex is not  different from
> luatex as luatex is different from pdftex/xetex/etex
> (and if it's so, then it is an error).
> A quick check could be
> \startluacode
> if jit==nil then print("=============>This is not luajitTeX") else
> print("=============>You are running luajitTeX ") end
> \stopluacode
> of course one can write a global
> jit ={} also in luatex.
> Another one used in the log is
> \startluacode
> print("===================>"..string.lower(status.banner))
> \stopluacode
> and you can search for luajittex .
> 
> My wish is that luajittex should be  100% compatible with luatex, but
> unfortunately there are  some differences between lua5.1 used by luajit2.0
> and lua5.2
> that makes this wish currently impossible to satisfied at engine level ---
> ConTeXt is smart enough to manage these differences, but you can still
> write
> a  lua script that is  valid for lua5.2 but not for luajit2.0, see for
> example
>  http://lua-users.org/lists/lua-l/2010-03/msg00237.html
> 
> Full compatibility between lua5.2 and luajit2.0, for what I see, is not on
> the top on the Mike Pall's agenda.

Thanks Luigi. That was pretty comprehensive.

For my purposes, it makes no different to me whether I am using luatex
or luajittex. However, in my document's front matter I like to have
general information about the tools used to typeset the document, and
for that reason I thought it would be nice if there was a simple and
elegant way to show which backend was used.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20130508/3e4dfc98/attachment.pgp>


More information about the ntg-context mailing list