I'm trying to figure out the best build system for latex.
Currently, I use latex-makefile, editing in vim, and viewing changes in Okular or gv. The major problem is that it sometimes gets hides errors on me, and I have to run latex manually. The major advantages are that it does all the iteration I need, and offers both pdf and ps simply.
If you have experience with
- latex-mk
- vim-latex
- kile
- lyx
- miktex
- latex-makefile
- the ultimate latex makefile
- rubber
- any others I havent come across
Would you recommend them, and why/why not?
I use Eclipse with the TexEcplise add-on for editing my TeX-files. It has syntax highlight for LaTeX. When you ask a preview of a non-altered and already compiled tex file, it open the file in the viewer. When the tex file was altered, then it compiles the tex file prior to viewing it. It does the necessary iterations, but only if needed.
Another advantage is that all errors and warnings are summarised in a box and they are highlighted in the tex file! This is a screenshot from the TexEclipse homepage.
Ok, so this question is a bit old, but it came up when I googled "latex build system" so I thought I'd add my two cents. I tried the Makefile based solutions, but found the output a bit verbose and unwieldy. I figured someone might have built a scons extension for latex, but was pleasantly surprised to find that scons already natively supports latex! All you need to do is create a SConsctruct file like this:
To build just run
scons report.pdf
. Scons will automatically build .tex files included by report.tex, handle bibliographies and perform repeated builds in order to resolve all references - simple!You can create DVI and PS files in the same way. For more info on these builders check out http://www.scons.org/doc/2.0.1/HTML/scons-user/a8524.html .
For more info on scons (a make replacement), see http://www.scons.org/
I wanted to use the script you posted in your final answer.
Unfortunately, it didn’t work with my setting (MacVim with vim-latexsuite, Skim as the viewer and XeTeX). I also use forward search (i.e. I use the feature that pressing \ls in Vim will jump to the corresponding point in the PDF document in the open viewer).
Furthermore, my document isn’t called
thesis.tex
(big surprise; it’s not a thesis). I’ve therefore done some more configuration work that I’d like to share. Attention, my bash skills are horrible.This compiles a temporary file and copies it back to whatever name was given (instead of the other way round as your script does); usage of the script:
Where
project
is the name of the TeX file, without file extension.I’ve also changed the
rubber-info
line:And I needed to patch my
latexmk
to use XeTeX since the name of the executable was hard-coded.Unfortunately, this still destroys the output PDF file when I’ve saved my document before completing a statement, since
latexmk
seems to always produce a PDF file, even on error – and its return code is always 0, which sucks.(To clarify this, say that I’ve just typed
emph{
into my document and save it. The background script will promptly compile the document, and fail. But it will still produce a (largely empty) output file).Additionally, forward search no longer works properly; it basically jumps to a wrong point in the document. I suspect that this has something to do with my copying the document before compilation.
So, this is still a completely unsatisfactory solution, even though I didn’t even enable continuous saving on typing in MacVim yet.