Skip to content

Instantly share code, notes, and snippets.

@rightson
Last active July 11, 2019 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightson/8c51139fd1048c3aa7e5290dd334fc0c to your computer and use it in GitHub Desktop.
Save rightson/8c51139fd1048c3aa7e5290dd334fc0c to your computer and use it in GitHub Desktop.
My Makefile to build PDF from LaTex
SOURCE := paper.tex
mk:
latexmk -cd -f -pdf -interaction=nonstopmode -synctex=1 $(SOURCE)
pdf:
pdflatex $(SOURCE)
clean:
$(call clean)
cleanall:
$(call cleanall)
.PHONY: mk pdf clean cleanall
define clean
ls *.* | grep -v -E 'tex$$|md$$|cls$$|pdf$$' | xargs rm -f
endef
define cleanall
ls *.* | grep -v -E 'tex$$|md$$|cls$$' | xargs rm -f
endef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment