Computer Scientist, Graduate Student, and Geek

Compiling LaTeX Publications for Conference Proceedings

July 25, 2011

As a computer science graduate student, compiling LaTeX publications for conferences is a frequent task. For the draft and submission versions, compilation settings are not as particular, but a final camera ready version has certain requirements, such as a PDF with embedded fonts. I have built a Makefile that allows me to compile everything from my early drafts to the final camera-ready version that meets the requirements of typical ACM publications.

The Makefile assumes your main LaTeX file is called main.tex (change the value assigned to the BASE variable if yours is different). Also, the camera-ready compilation process assumes you have a single latex file called camera.tex that contains all tex files and the bbl, the compiled bibliography (change the value assigned to the CAMERABASE variable if yours is different).

LATEX = latex
BIBTEX = bibtex

PDF = ps2pdf
PDF_FLAGS = -dPDFSETTINGS=/prepress

PS = dvips
PS_FLAGS = -t letter

BASE = main
CAMERABASE = camera

.PRECIOUS:$(CAMERABASE).ps

all: version $(BASE).pdf

camera: $(CAMERABASE).pdf

version:
    svnversion > version.tex

%.pdf: %.ps
    $(PDF) $(PDF_FLAGS) $< 

%.ps: %.dvi
    $(PS) $(PS_FLAGS) $< -o $@

$(BASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
    $(LATEX) ${@:.dvi=}
    $(BIBTEX) ${@:.dvi=}
    $(LATEX) ${@:.dvi=}
    $(LATEX) ${@:.dvi=}

$(CAMERABASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
    $(LATEX) ${@:.dvi=}
    $(LATEX) ${@:.dvi=}
    $(LATEX) ${@:.dvi=}

clean:
    rm -rf *.dvi *.aux *.blg *.log $ *~ *.bbl *.out
    rm -rf (BASE).ps $(BASE).pdf $(CAMERABASE).pdf

Categories: Uncategorized

Tags: latex, subversion