[luatex] texlua vs. luatex
taco at elvenkind.com
Mon Apr 22 13:27:27 CEST 2013
On Apr 22, 2013, at 11:29 AM, Élie Roux <elie.roux at telecom-bretagne.eu> wrote:
> Dear all,
> I'm in front of a strange problem: I have a .lua script that can be called from both luatex and texlua, and I would like to have a different behaviour according to the caller. The problem is that I cannot find a reliable way to know if the script is called with texlua or luatex…
> What would be the best solution?
There is no 'perfect' solution right now. The best bet is to check for the existence of the 'tex', 'token', 'node', or 'pdf' tables, neither of which exist if texlua or --luaonly is given. Not so nice, but the best one can do right now, I think.
More information about the luatex