<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 8:48 PM, Élie Roux <span dir="ltr"><<a href="mailto:elie.roux@telecom-bretagne.eu" target="_blank">elie.roux@telecom-bretagne.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear All,<br>
<br>
For a project, I need to make a few convoluted checks and treatments<br>
before including some files. The problem comes when the path to this<br>
included file is relative, and when compilation occurs outside the<br>
directory of the main .tex file. In this case \jobname is just the<br>
filename, and lfs.currentdir() is the directory where the compilation<br>
occurs, but it's not enough to know where the main .tex file really is.<br>
<br>
Is there a way to get to know the absolute directory of the main .tex<br>
file in luatex (argument string parsing maybe?)? If not would it be<br>
reasonable to create one?<br>
<br>
Thank you,<br>
<span class=""><font color="#888888">--<br>
Elie<br>
</font></span></blockquote></div><br>can you try with <br clear="all"><div><div>\directlua{</div><div> print()</div><div> print("currentdir:"..lfs.currentdir())</div><div> texio.write_nl("")</div><div> for k, v in ipairs(arg) do</div><div> texio.write_nl(k .. " " .. v)</div><div> end</div><div> texio.write_nl("")</div><div> </div><div>}</div><div><br></div><div><br></div><div><br></div><div>\bye</div></div>-- <br><div class="gmail_signature">luigi<br></div>
</div></div>