On Thu, 24 Mar 2011, Florian Wobbe wrote:

How would you automatically find out the filename which the macro is called 
from? For instance if the file with the macro is included in a master document.

\inputfilename

So, if you want the name of the file in which this macro is defined in, then 
something like this should work:

\edef\thisfilename{\inputfilename}

\def.....{...."\thisfilename.tex", ...}

Thanks, nice! I suppose the filename is also directly reachable from inside \startluacode ... \stopluacode. How?

\start-stop luacode expands its contents. So, the following should work (untested)

\startluacode
  thisfilename = "\thisfilename.tex"
\stopluacode

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to