Skip to content

Instantly share code, notes, and snippets.

Created February 3, 2011 02:11
What would you like to do?
A sample makefile for a paper in LaTeX.
TEX = pdflatex -interaction nonstopmode
BIB = bibtex
GS = gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
COVER = cover
PAPER = paper_main
SUPP = paper_supp
BIBFILE = temp.bib
BUNDLE = paper_bundle.pdf
all: $(COVER).pdf $(PAPER).pdf $(SUPP).pdf
$(GS) -sOutputFile=$(BUNDLE) $(COVER).pdf $(PAPER).pdf $(SUPP).pdf
view: $(BUNDLE)
open $(BUNDLE)
ispell *.tex
rm -fv *.aux *.log *.bbl *.blg *.toc *.out *.lot *.lof $(PAPER).pdf $(SUPP).pdf $(BUNDLE)
$(PAPER).pdf: $(PAPER).tex $(PAPER).bbl
$(PAPER).bbl: $(PAPER).tex $(BIBFILE)
$(SUPP).pdf: $(SUPP).tex $(SUPP).bbl
$(TEX) $(SUPP)
$(TEX) $(SUPP)
$(SUPP).bbl: $(SUPP).tex $(BIBFILE)
$(TEX) $(SUPP)
$(BIB) $(SUPP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment