Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there any way to call a lua script automatically immediately after lualatex finishes(and pass the jobname)?

Basically I need to do some post process and cannot do it within the same job so I would like to run a script immediately after if it exists and pass to the script the jobname.

share|improve this question
    
No idea if there exists a luatex specific solution. But you can reprocess a tex document inside a compilation with a new jobname. See e.g. this example (the source was a posting in c.t.t.) mrunix.de/forums/showpost.php?p=298567&postcount=7 –  Ulrike Fischer May 14 '12 at 10:39
    
possible duplicate of Lualatex after pdf is generated –  Jake May 15 '12 at 14:35
add comment

1 Answer 1

No, there is no solution for this in LuaTeX. You need to write a small wrapper around your LuaTeX call.

share|improve this answer
    
I've spent all day yesterday writing a luatex script to make it easier to use \include (instead of commenting them out or using includeonly) and then it turns out luatex doesn't have the proper callbacks before and after the pdf output creation. One or two extra lines of code that could have been added to lualatex without any drawbacks have cost me several hours... Unfortunately I deal with this kinda stuff on a daily basis and it becomes a huge waste of time(not just with tex/latex). I'll just go back to using % and hope lualatex will be updated in the future to support this functionality –  Uiy May 14 '12 at 12:05
3  
@Uiy "If so then forget it..." - Just to get the record right: It is not me who is trying to get something done, but you. –  topskip May 14 '12 at 12:27
1  
@Uiy: LuaTeX is free software. Where's your patch? –  Martin Schröder May 15 '12 at 7:10
    
@MartinSchröder Yeah, then I go to build it and send hours trying to get it to build correctly because it won't build on my machine since I'm actually keep my stuff up to date and do not use linux. For example, I just tried to install luarocks. Guess what? When I try to install the sockets package I can't because when it tries to build it the .sln file is not uptodate and msbuild will not build the solution since it is too old. Which means I'll have to go figure out how to do that if I want to to use luarocks... worth it? No! Again, I got better things to do than waste more of my time. –  Uiy May 15 '12 at 7:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.