Created
March 8, 2022 20:10
-
-
Save maxiimilian/c82dcd832801a0f5d3256ac1d7d92d5e to your computer and use it in GitHub Desktop.
Latex Makefile
This file contains hidden or 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
.PHONY: pdf clean todo preflight figures nomenclature snapshot | |
TEX_FILES := $(wildcard *.tex) | |
TEX_FILES_EXCEPT_MAIN := $(filter-out main.tex, $(TEX_FILES)) | |
PYTHON := ~/.virtualenvs/MA/bin/python | |
SNAPSHOT_DIR := ../latex_snapshots | |
pdf: literature.bib | |
latexmk -pdf main.tex | |
write: literature.bib | |
latexmk -pvc -pdf main.tex | |
clean: | |
latexmk -C main.tex | |
find . -name '*.aux' -or -name '*.fls' -or -name '*.log' -or -name 'main.*' -not -name 'main.tex' -delete | |
rm literature.bib | |
#sed -i '' s/−/-/g *.bib | |
spell: $(TEX_FILES_EXCEPT_MAIN) | |
hunspell -d en_GB-large $^ || hunspell -d en_GB $^ | |
todo: | |
grep -r --color=always "todo" *.tex | |
grep -r --color=always "comm" *.tex | |
preflight: todo | |
grep -r --color=always -E "(will|shall||above|so.called)" *.tex | |
literature.bib: | |
curl http://127.0.0.1:23119/better-bibtex/export/collection?/1/VFYVJRQF.biblatex | grep -v file > $@ | |
snapshot: pdf | |
cp main.pdf $(SNAPSHOT_DIR)/main_$(shell date +%Y-%m-%d).pdf | |
#%.pdf_tex: %.svg | |
#./svg_to_pdf_tex.sh $< | |
#figures: ./figures/methods/modelling_schematic/schematic.pdf_tex | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment