Skip to content

Instantly share code, notes, and snippets.

@vsbuffalo
Last active Nov 28, 2018
Embed
What would you like to do?
finally, a LaTeX makefile that captures your anger and frustration
# Thanks https://github.com/EBI-predocs/latex-thesis/blob/master/Makefile for
# some tips
LATEXMK = latexmk -xelatex
# CONFIG
target = manuscript
references = bib.bib
# SETUP
includes := $(shell ls *.tex) ${references}
.PHONY: ${target}
${target}: ${target}.pdf
${target}.pdf: ${includes}
${LATEXMK} ${target}
force: build-my-fucking-pdf
build-my-fucking-pdf: ${target}
${LATEXMK} -pvc -g ${target}
preview:
${LATEXMK} -pvc ${target}
tidy:
latexmk -c ${target}
clean:
latexmk -C ${target}
nuke-biber:
# Too bad this doesn't handle Canadian singers too
${RM} -r $(shell biber --cache) # biber, you suck.
nuke: nuke-biber
# don't even trust latexmk not to fuck something up
${RM} $(filter-out %.tex %.pdf,$(shell ls ${target}.*))
calm:
@echo "downloading your calming quote..."
curl https://gist.githubusercontent.com/vsbuffalo/04ad93826edb6525ec6f/raw/9563e1e3c2bfde9aad4dd9e51e1a2087f2b822f1/gistfile1.txt 2> /dev/null | gshuf -n1 | sed 's/::: /-/'
anger:
@echo "don't worry, LaTeX really is shitty."
.PHONY: clean preview nuke tidy force build-my-fucking-pdf calm nuke-biber all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment