A friend recently turned me on to latex-makefile. This little script generates a universal Makefile
for building latex documents. I was pretty impressed. All you need to do is copy the generated Makefile
into your working directory of tex files and issue:
make
or if you have many .tex
files
make [main_document]
I caught myself copying this makefile into a few places which seemed a bit silly so instead I put it in a reasonable place and made an alias to find it there:
export LMAKEFILE="/usr/local/include/UniversalLatexMakefile"
alias lmake="make -f $LMAKEFILE"
Now I can type from anywhere:
lmake [main document]
without copying the Makefile