Last active
August 29, 2015 14:17
-
-
Save drewsberry/6ec8906891ba7125c47c to your computer and use it in GitHub Desktop.
Template LaTeX Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You only need to change these top two lines | |
BASE=your-main-file | |
DEP=your-dependencies.tex | |
SRC=$(BASE).tex | |
PDF=$(BASE).pdf | |
LATEXMK=latexmk -pdf -pdflatex="pdflatex --shell-escape %O %S" | |
LATEXMKCONT=latexmk -pvc -pdf -pdflatex="pdflatex --shell-escape --interaction=nonstopmode %O %S" | |
TMP=$(BASE).pdfsync *~ *.tmp *.bbl *.blg *.aux *.end *.fls *.log *.out *.fdb_latexmk | |
all: $(PDF) | |
$(PDF): $(SRC) $(DEP) | |
$(LATEXMK) $(SRC) | |
cont: | |
$(LATEXMKCONT) $(SRC) | |
force: | |
latexmk -C $(BASE) | |
rm -rf $(TMP) | |
$(LATEXMK) $(SRC) | |
clean: | |
latexmk -C $(BASE) | |
rm -rf $(TMP) | |
count: | |
@texcount -inc -sum -0 '$(SRC)' | tr -d '\n' | |
@echo | |
.PHONY: all cont force clean count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment