-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
45 lines (33 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Rules for compiling the PDF from the LaTeX sources and displaying the output
### Documents to build
PDF = paper/preprint.pdf paper/manuscript.pdf
### File Types (for dependencies)
TEX = $(filter-out $(PDF:.pdf=.tex), $(wildcard paper/*.tex))
TEXVARS = $(wildcard paper/variables/*.tex)
BIB = $(wildcard paper/*.bib)
FIG = $(wildcard paper/figures/*)
all: $(PDF)
%.pdf: %.tex $(TEX) $(BIB) $(FIG)
tectonic -X compile $<
show: $(PDF)
@for f in $?; do xdg-open $$f; done
clean:
rm -f $(PDF) paper/misc/cover-letter.pdf
format:
black code/
lock: conda-lock.yml
conda-lock.yml: environment.yml
conda-lock -f $<
letter: paper/misc/cover-letter.pdf
paper/misc/cover-letter.pdf: paper/misc/cover-letter.tex paper/information.tex
tectonic -X compile $<
paper/variables.tex: $(TEXVARS)
cat $^ > $@
# paper/figures/%.png paper/variables/%.tex &: code/%.ipynb code/euler.py
# jupyter execute --inplace --kernel_name=python3 $< && touch paper/figures/$*.png paper/variables/$*.tex
#
# paper/figures/real-data-application.png paper/variables/real-data-application.tex &: code/real-data-application.ipynb code/euler.py data/rio-de-janeiro-magnetic.csv
# jupyter execute --inplace --kernel_name=python3 $< && touch paper/figures/real-data-application.png paper/variables/real-data-application.tex
#
# data/rio-de-janeiro-magnetic.csv paper/variables/real-data-preparation.tex &: code/real-data-preparation.ipynb data/raw/1038_XYZ.tar.xz
# jupyter execute --inplace --kernel_name=python3 $< && touch data/rio-de-janeiro-magnetic.csv paper/variables/real-data-preparation.tex