Possible Duplicate:
Tools for automating document compilation

I am fairly new to latex and would like to automate my workflow (creating pdfs from a beamer/listings/tkiz source).

What I want is a script to automatically recompile the source and reload the resulting pdf in acrobat whenever my code changes. Of course this is easy to do however I have one issue:

How can a script determine whether or not a second pass of pdflatex is neccessary?

Unfortunately this cannot be deduced from pdflatex' exit code (which is 0 even when another pass is needed), but maybe there is some other way to detect that in an automated way.

Many thanks!

marked as duplicate by lockstep, Marco Daniel, egreg, Stephan Lehmke, Ian Thompson Jun 11 '12 at 10:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 6
    Have a look at latexmk – egreg Jun 8 '12 at 15:56
  • I can only second egreg's advise: latexmk is probably the way to go. You also might want to change your PDF viewer, as there are viewers, which automatically reload the PDF file, if the file changed. – Patrick Häcker Jun 8 '12 at 16:13
  • If you are a vim user, the latex-suite is a set of tools that support compilation of documents within vim. – Miguel de Val-Borro Jun 8 '12 at 16:35

Have you thought about using Rubber on Linux Terminal http://latexbr.blogspot.com.br/2011/11/compilando-com-rubber.html.

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