-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (95 loc) · 3.38 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
# specify thh main file and all the files that you are including
SOURCE= main.tex $(wildcard local*.tex) $(wildcard chapters/*.tex) \
langsci/langscibook.cls
# specify your main target here:
pdf: main.bbl main.pdf #by the time main.pdf, bib assures there is a newer aux file
all: pod cover
complete: index main.pdf
index: main.snd
main.pdf: main.aux
xelatex main
main.aux: $(SOURCE)
xelatex -no-pdf main
#create only the book
main.bbl: $(SOURCE) localbibliography.bib
xelatex -no-pdf main
biber main
main.snd: FORCE
xelatex main
touch main.adx main.sdx main.ldx
sed -i s/.*\\emph.*// main.adx #remove titles which biblatex puts into the name index
sed -i s/.*ASTM.*// main.adx
sed -i s/.*BBC.*// main.adx
sed -i s/.*Court.*// main.adx
sed -i s/.*DGT.*// main.adx
sed -i s/.*DIN.*// main.adx
sed -i s/.*EN.*// main.adx
sed -i s/.*Europ.*// main.adx
sed -i s/.*GSC.*// main.adx
sed -i s/.*ISO.*// main.adx
sed -i s/.*Office.*// main.adx
sed -i s/.*SCTA.*// main.adx
sed -i s/.*TAUS.*// main.adx
sed -i s/.*WordNet.*// main.adx
sed -i s/.*Council.*// main.adx
sed -i s/.*17100.*// main.adx
sed -i s/.*CJEU.*// main.adx
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.sdx # ordering of references to footnotes
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.adx
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.ldx
python3 fixindex.py
mv mainmod.adx main.adx
makeindex -o main.and main.adx
makeindex -o main.lnd main.ldx
makeindex -o main.snd main.sdx
xelatex main
xelatex main
#create a png of the cover
cover: FORCE
convert main.pdf\[0\] -quality 100 -background white -alpha remove -bordercolor "#999999" -border 2 cover.png
cp cover.png googlebooks_frontcover.png
convert -geometry 50x50% cover.png covertwitter.png
display cover.png
googlebooks: googlebooks_interior.pdf
googlebooks_interior.pdf: complete
cp main.pdf googlebooks_interior.pdf
pdftk main.pdf cat 1 output googlebooks_frontcover.pdf
openreview: openreview.pdf
openreview.pdf: main.pdf
pdftk main.pdf multistamp orstamp.pdf output openreview.pdf
proofreading: proofreading.pdf
proofreading.pdf: main.pdf
pdftk main.pdf multistamp prstamp.pdf output proofreading.pdf
paperhive:
git branch gh-pages
git checkout gh-pages
git add proofreading.pdf versions.json
git commit -m 'prepare for proofreading' proofreading.pdf versions.json
git push origin gh-pages
git checkout master
echo "langsci.github.io/BOOKID"
firefox https://paperhive.org/documents/new
blurb: blurb.html blurb.tex biosketch.tex biosketch.html
blurb.tex: blurb.md
pandoc -f markdown -t latex blurb.md>blurb.tex
blurb.html: blurb.md
pandoc -f markdown -t html blurb.md>blurb.html
biosketch.tex: blurb.md
pandoc -f markdown -t latex biosketch.md>biosketch.tex
biosketch.html: blurb.md
pandoc -f markdown -t html biosketch.md>biosketch.html
#housekeeping
clean:
rm -f *.bak *~ *.backup *.tmp \
*.adx *.and *.idx *.ind *.ldx *.lnd *.sdx *.snd *.rdx *.rnd *.wdx *.wnd \
*.log *.blg *.ilg \
*.aux *.toc *.cut *.out *.tpm *.bbl *-blx.bib *_tmp.bib *bcf \
*.glg *.glo *.gls *.wrd *.wdv *.xdv *.mw *.clr \
*.run.xml \
chapters/*aux chapters/*~ chapters/*.bak chapters/*.backup\
langsci/*/*aux langsci/*/*~ langsci/*/*.bak langsci/*/*.backup
realclean: clean
rm -f *.dvi *.ps *.pdf
chapterlist:
grep chapter main.toc|sed "s/.*numberline {[0-9]\+}\(.*\).newline.*/\\1/"
FORCE: