forked from matplotlib/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (46 loc) · 1.28 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
46
47
48
49
50
51
52
53
54
55
56
SRC := $(wildcard *.tex)
.PHONY: default
default: all
.PHONY: all
all: logos figures cheatsheets handouts
mkdir -p ./build/
cp cheatsheets*.p* ./build/
cp handout-*.p* ./build/
.PHONY: logos
logos:
cd logos && python mpl-logos2.py && pdfcrop mpl-logo2.pdf mpl-logo2.pdf
.PHONY: figures
figures:
# generate the figures
cd scripts && for script in *.py; do echo $$script; python $$script; done
# crop the figures
cd figures && for figure in *.pdf; do echo $$figure; pdfcrop $$figure $$figure; done
# regenerate some figures that should not be cropped
cd scripts && python styles.py
.PHONY: cheatsheets
cheatsheets:
xelatex cheatsheets.tex
convert -density 150 cheatsheets.pdf -scene 1 cheatsheets.png
.PHONY: handouts
handouts:
xelatex handout-beginner.tex
xelatex handout-intermediate.tex
xelatex handout-tips.tex
convert -density 150 handout-tips.pdf handout-tips.png
convert -density 150 handout-beginner.pdf handout-beginner.png
convert -density 150 handout-intermediate.pdf handout-intermediate.png
.PHONY: fonts
fonts:
make -C fonts/
.PHONY: clean
clean: $(SRC)
latexmk -c $^
- rm -rf ./build/
.PHONY: clean-all
clean-all: clean
- rm ./logos/mpl-logo2.pdf
git clean -f -X ./figures/
git clean -f ./scripts/*.pdf
.PHONY: requirements
requirements:
$(MAKE) -C ./requirements/