Posts categorized under: Latex

Simple Makefile to Compile Latex Document

Below is a simple Makefile that I usually use to compile latex document.

# Makefile to compile latex document
# write the name of your main latex file here (without suffix .tex)
project=

tex=pdflatex
bibtex=bibtex
buildtex=$(tex) $(project).tex

all:
    $(buildtex)
    $(bibtex) $(project) || true
    $(buildtex)
    $(buildtex)

clean-all:
    rm -f *.dvi …