LaTeX file builder

(Note: I only intend this program to run under Unix-like systems.)

When I was a researcher one of my most heavily used software was LaTeX, to type notes and papers, and of course theses. And since I don't like editing huge files, I usually end up having a file that will read quite a few files, including bibliography database. Adding in a few formats of figures, and adding the need to sometimes produce PostScript files and sometimes PDF files, this becomes a very tedious thing to do to build a file from its LaTeX source. Unluckily this needed to be done regularly.

In the old days, I would create a makefile to rebuild everything. Whenever I modify something, I would just type "make", and everything would work fine. Except when it didn't. At times a new file is added, and I forget to update the make file. And of course, the LaTeX build cycle isn't really one which is tailor-made for "make": some of the output files in turn becomes input files, making up a loop that "make" never intend to address. This makes the makefile very complex and difficult to debug.

I wanted to create something that works better, at least in my little domain of typesetting a note, a paper or a thesis. So I've written a small Perl script that will do the trick all by itself: it will read the LaTeX file as input, parse the file to find the files it depends on, and recursively see whether those files are there or can be made. Then it checks whether things need updating, and fire needed commands to perform such updates. The whole build process is then trimmed down to just firing something like "build-tex.pl paper.pdf" and see the file generated.

Currently the tool handle EPS/PDF input, DIA diagrams, MPOST diagrams, IPE diagrams, BIBTEX database, DVI output, PS output and PDF output. The difficulty of adding new format depends on how hard the format can be recognized and how much new procedure it introduces to the build procedure.

Download

Program (script, library)

Instructions