![](https://secure.gravatar.com/avatar/5705290add533907ed4869f7e9f586c3.jpg?s=120&d=mm&r=g)
24 Mar
2011
24 Mar
'11
11:59 a.m.
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? Florian