forked from cloudmesh-book/book-latex-2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
196 lines (154 loc) · 4.96 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
.PHONY: book images dot
FILE=vonLaszewski-bigdata
#FLAGS=-interaction nonstopmode -halt-on-error -file-line-error
#FLAGS=-interaction nonstopmode -file-line-error
FLAGS=-shell-escape
CLOUD=cloud
FLAGS=-shell-escape -output-directory=dest -aux-directory=dest --max-print-line=140
DEFAULT=$(CLOUD)
LATEX=pdflatex
#LATEX=pdfflatex
#LATEX=pydflatex -k
g: dest markdown
latexmk -jobname=$(FILE) $(FLAGS) -pvc -view=pdf $(FILE)
setup:
export max_print_line=1000
graphicspath:
bin/list-images-dirs.py > graphicspath.tex
once: setup clean dest markdown graphicspath
latexmk -jobname=$(FILE) $(FLAGS) -view=pdf $(FILE)
# make html
abc:
latexmk -jobname=b $(FLAGS) -pvc -view=pdf b
travis: dest markdown graphicspath
latexmk -pdflatex='pdflatex -file-line-error -synctex=1' -jobname=$(FILE) $(FLAGS) -pdf $(FILE)
issues: clean dest
python bin/issues.py > section/preface/issues.tex
pdflatex issues
#latexmk -jobname=issues $(FLAGS) -view=pdf issues
dot:
cd dot; dot -Tpdf gr.dot -o gr.pdf
markdown:
bin/md-all-to-tex.py
test: dest markdown
pdflatex $(FILE)
gg: setup dest markdown graphicspath
pdflatex -shell-escape $(FILE)
check:
make gg
pdflatex:
make gg
google:
gdrive update 1Mdd_TJcbXurJYRpG2gKCVqWmbhvED2Mp dest/vonLaszewski-bigdata.pdf
single: dest graphicspath
latexmk -jobname=single $(FLAGS) -pvc -view=pdf single
draft: clean dest graphicspath
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-503/master/sd-card-ubuntu.md > tmp/sd-card-ubuntu.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-508/master/cluster/sd-card-osx.md > tmp/sd-card-osx.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-602/master/sd-card-windows.md > tmp/sd-card-windows.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-421/master/ssh-keygen.md > tmp/ssh-keygen.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-412/master/cluster/readme-spark.md > tmp/readme-spark.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-526/master/cluster/readme-kube.md > tmp/readme-kube.md
curl -s https://raw.githubusercontent.com/cloudmesh-community/hid-sp18-405/master/Cluster/pi-dhcp.md > tmp/pi-dhcp.md
bin/md-tmp-to-tex.py
latexmk -jobname=draft $(FLAGS) -view=pdf draft
dd: dest graphicspath
cd tmp; python ../bin/md-all-to-tex.py
latexmk -jobname=draft $(FLAGS) -pvc -view=pdf draft
c: dest graphicspath
latexmk -jobname=$(FILE) $(FLAGS) -pvc -view=pdf chameleon
plain: dest graphicspath
latexmk -jobname=$(FILE) $(FLAGS) -pvc -view=pdf plain
cloud: dest markdown graphicspath
$(LATEX) $(FLAGS) $(CLOUD)
makeindex $(CLOUD).idx -s format/StyleInd.ist
biber $(CLOUD)
$(LATEX) $(FLAGS) $(CLOUD)
$(LATEX) $(FLAGS) $(CLOUD)
skim: dest
echo $(DEFAULT)
open -a /Applications/skim.app $(DEFAULT).pdf
all: dest makedown graphicspath
$(LATEX) $(FLAGS) $(FILE)
makeindex $(FILE).idx -s format/StyleInd.ist
biber $(FILE)
$(LATEX) $(FLAGS) $(FILE)
$(LATEX) $(FLAGS) $(FILE)
all2:
$(LATEX) $(FLAGS) $(FILE)
makeindex $(FILE).idx -s format/StyleInd.ist
biber $(FILE)
$(LATEX) $(FLAGS) $(FILE) x 2
$(LATEX) $(FLAGS) $(FILE) x 2
simple:
$(LATEX) $(FLAGS) $(FILE)
#|fgrep -v "Underfull" |fgrep -v "Overfull" | fgrep -v "undefined on input"
# makeindex $(FILE).idx -s format/StyleInd.ist
# biber $(FILE)
# $(LATEX) $(FLAGS) $(FILE) x 2
# $(LATEX) $(FLAGS) $(FILE) x 2
book:
python book.py
images:
cp -r ~/github/cloudmesh/classes/docs/source/images/ images
fetch:
cd chapter; make
old:
$(LATEX) $(FILE)
makeindex $(FILE).idx -s StyleInd.ist
biber $(FILE)
$(LATEX) $(FILE) x 2
clean:
rm -fr single
rm -fr $(FILE)
rm -f *.aux
rm -f *.bbl
rm -f *.bcf
rm -f *.blg
rm -f *.idx
rm -f *.ilg
rm -f *.ind
rm -f *.pdf
rm -f *.ptc
rm -f *.run.xml
rm -f *.toc
rm -f *.log
rm -f *.markdown.out
rm -f *.markdown.lua
rm -f *.markdown.err
rm -f *.fls
rm -f *.listing
rm -f *.fdb_latexmk
rm -f *.synctex.gz
rm -rf _markdown_*
rm -rf dest
rm -rf *.tdo
find . -name '*.aux' -delete
rm -fr _minted-*
rm -f tmp/*
rm -f *-dot2tex-*
rm -f *.out
bin/md-clean-tex.py
view:
open dest/$(FILE).pdf
publish:
echo pdf document copied to google
# cp dest/$(FILE).pdf .
# cp $(FILE).pdf ~/github/laszewsk/papers/
# cd ~/github/laszewsk/papers; git add $(FILE).pdf; git commit -m "update $(FILE)"; git push
# cp $(FILE).pdf ~/github/laszewsk/laszewski.github.io/papers/$(FILE).pdf
# cd ~/github/laszewsk/laszewski.github.io/papers; git add $(FILE).pdf; git commit -m "update $(FILE)"; git push
make -f Makefile.publish
make -f Makefile google
html:
mkdir -p ~/pdf
cp dest/$(FILE).pdf ~/pdf
docker run -ti --rm -v ~/pdf:/pdf bwits/pdf2htmlex pdf2htmlEX --zoom 1.3 $(FILE).pdf
# gdrive update 10zA34VsM-WnsQo31rHzDOtqdU3rqvkvQ ~/pdf/vonLaszewski-bigdata.html
size:
du -c -h dest/vonLaszewski-bigdata.pdf | fgrep total > dest/size.txt
du -c -h dest/vonLaszewski-bigdata.pdf | fgrep total
watch:
latexmk -pvc -view=pdf ${FILE}
dest: setup
python bin/create-dirs.py