Skip to content

Instantly share code, notes, and snippets.

@bheesham
Last active December 5, 2015 02:22
Show Gist options
  • Save bheesham/c15bfbe8a723e3e246b0 to your computer and use it in GitHub Desktop.
Save bheesham/c15bfbe8a723e3e246b0 to your computer and use it in GitHub Desktop.
Makefile for my LaTeX projects.
.PHONY: clean spell count
SOURCE=template.tex
# template.bib, graphics, etc.
ADDITIONAL=
NAME=$(patsubst %.tex,%,$(SOURCE))
OUTPUT=$(patsubst %.tex,%.pdf,$(SOURCE))
$(OUTPUT): $(SOURCE) $(ADDITIONAL)
yes '' | pdflatex $(NAME); yes '' | bibtex $(NAME); \
yes '' | pdflatex $(NAME); yes '' | pdflatex $(NAME)
count: $(SOURCE)
texcount $<
spell: $(SOURCE)
aspell -t -c $<
clean:
rm *.aux *.bbl *log *.blg $(OUTPUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment