I just stumbled on this blog post about
rubber and was thinking: "Isn't that exactly what
latexmk does?". So, now I wonder: isn't it? Or are there any differences?
It seems that the rubber has the following features that are not (yet?) offered by latexmk:
- Rubber parses the LaTeX log file, filters it, and pretty-prints only "relevant" messages (warnings, errors). Rubber always runs LaTeX in a non-interactive mode, while latexmk seems to require additional switches or configuration.
- With rubber you can have configuration options as comments in the LaTeX source code; latexmk requires auxiliary configuration files.
- Most importantly, rubber lets you specify the correct values of TEXINPUTS, BIBINPUTS, BSTINPUTS, etc. for each document using the aforementioned configuration options; latexmk seems to expect that these environment variables are already defined appropriately.
Of course many of these issues can be worked around with some wrapper scripts and auxiliary files. And obviously there are many features of latexmk that are not offered by rubber.
One important advantage of latexmk over rubber is that latexmk detects dependent files much more reliably. As best as I have been able to work out, rubber determines the dependent files by parsing the tex file, by looking for
\includegraphics macros. But if these macros are buried inside another macro, rubber doesn't detect the dependent files correctly. E.g., if you have
rubber won't detect that
sub.tex is a dependent file. Thus if the file
sub.tex changes, rubber won't detect that the compilation needs to be run again.
Latexmk instead parses the log file and uses the
-recorder option of (
latex to determine the dependent files.
Latexmk also brings an auto-preview feature, which recompiles (smartly) the pdf as soon as the tex is saved.
There are also more advanced features, like tight integration with makefiles for example.