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!
latexmk