On 4/22/2013 11:29 AM, Élie Roux 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...

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?

arg[-2] or arg[-1] or arg[0]

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

Reply via email to