<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 9:45 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">Le 10/03/2015 21:34, luigi scarso a écrit :<br>
<span class="">> \directlua{<br>
>     print()<br>
>     print("currentdir:"..lfs.currentdir())<br>
>     texio.write_nl("")<br>
>     for k, v in ipairs(arg) do<br>
>         texio.write_nl(k .. " " .. v)<br>
>     end<br>
>     texio.write_nl("")<br>
><br>
> }<br>
><br>
><br>
><br>
> \bye<br>
<br>
</span>Thanks, it will require some more tests (for instance the arg must end<br>
by \jobname.xxx, etc.), but I can handle it from now.<br>
<br>
Thank you very much!<br>
<span class=""><font color="#888888">--<br>
Elie<br>
</font></span></blockquote></div>another one from Hans<br><div class="gmail_extra">\catcode`\%=11</div><div class="gmail_extra"><br></div><div class="gmail_extra">\directlua{</div><div class="gmail_extra">    function fulljobname()</div><div class="gmail_extra">        local p = nil</div><div class="gmail_extra">        for k, v in ipairs(arg) do</div><div class="gmail_extra">            if not string.find(v,"^%-") then</div><div class="gmail_extra">                p = v</div><div class="gmail_extra">                break</div><div class="gmail_extra">            end</div><div class="gmail_extra">        end</div><div class="gmail_extra">        if p then</div><div class="gmail_extra">            p = string.gsub(p,"%-%.","%%1")</div><div class="gmail_extra">            if string.find(p,tex.jobname) then</div><div class="gmail_extra">                return p</div><div class="gmail_extra">            end</div><div class="gmail_extra">        end</div><div class="gmail_extra">        return tex.jobname</div><div class="gmail_extra">    end</div><div class="gmail_extra">    texio.write_nl("")</div><div class="gmail_extra">    texio.write_nl(fulljobname())</div><div class="gmail_extra">    texio.write_nl("")</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">\bye</div><div><br></div>-- <br><div class="gmail_signature">luigi<br></div>
</div></div>