[luatex] texlua vs. luatex

Élie Roux elie.roux at telecom-bretagne.eu
Mon Apr 22 11:29:22 CEST 2013


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

I cannot inspect arg[0] because some scripts are just symbolic links to 
texlua or luatex and it's impossible to have information from it.

I cannot try texconfig.formatname nor texconfig.jobname as these are 
never filled in the formats in TeXLive (this is something I would like 
to address soon).

I tried to look into ConTeXt sources, but I did not manage to find a 
clue (especially since I don't know the sources well)...

What would be the best solution?

Thank you,
-- 
Elie


More information about the luatex mailing list