Skip to content

Instantly share code, notes, and snippets.

@binshengliu
Last active February 16, 2017 09:15
Show Gist options
  • Save binshengliu/c8deebb9eebf5e1c82ba53649bd9af90 to your computer and use it in GitHub Desktop.
Save binshengliu/c8deebb9eebf5e1c82ba53649bd9af90 to your computer and use it in GitHub Desktop.
Makefile template for latex projects
# https://danielkaes.wordpress.com/2009/03/14/compiling-latex-documents-using-makefiles/
PROJECT= # tex file name here without extension
TEX=pdflatex
BIBTEX=bibtex
BUILDTEX=$(TEX) $(PROJECT).tex
all:
$(BUILDTEX)
$(BIBTEX) $(PROJECT)
$(BUILDTEX)
$(BUILDTEX)
# This idea is from http://www.systutorials.com/1643/a-simple-makefile-for-latex/
read:
evince $(PROJECT).pdf &
clean-all:
rm -f *.dvi *.log *.bak *.aux *.bbl *.blg *.idx *.ps *.eps *.pdf *.toc *.out *~
clean:
rm -f *.log *.bak *.aux *.bbl *.blg *.idx *.toc *.out *~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment