Thursday, November 29, 2012

LaTeX Makefile

I've taken to using rubber and a Makefile to help in my LaTeX projects.  I create a main directory with a .tex file, and put any additional ones in a tex/ directory.
.PHONY: clean all cleanall
# Make sure this has all of the right dependencies
DEPENDS=tex/*.tex *.sty *.bib *.tex
TARGET=aexam
all: $(TARGET).pdf
%.pdf: %.tex $(DEPENDS)
rubber -f --pdf -s $<
rubber-info --check $<
clean:
rubber --clean $(TARGET)
cleanall:
rubber --clean --pdf $(TARGET)
view raw Makefile hosted with ❤ by GitHub


Saved for prosterity

No comments:

Post a Comment