-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (52 loc) · 1.8 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
# specify your main target here:
all: book pod cover
# specify thh main file and all the files that you are including
SOURCE= $(wildcard *.tex) $(wildcard chapters/*.tex)\
localbibliography.bib\
langsci/langscibook.cls
main.pdf: $(SOURCE)
xelatex -no-pdf main
bibtex -min-crossrefs=200 main
bibtex main1-blx
xelatex -no-pdf main
sed -i s/.*\\emph.*// main.adx #remove titles which biblatex puts into the name index
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.sdx
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.adx
makeindex -o main.and main.adx
makeindex -o main.lnd main.ldx
makeindex -o main.snd main.sdx
xelatex -no-pdf main
xelatex main
#create only the book
book: main.pdf
#create a png of the cover
cover: main.pdf
convert main.pdf\[0\] -quality 100 -background white -alpha remove -bordercolor black -border 2 cover.png
display cover.png
convert -geometry 50x50% cover.png covertwitter.png
#prepare for print on demand services
pod: bod createspace
#prepare for submission to BOD
bod: main.pdf
sed "s/output=short/output=coverbod/" main.tex >bodcover.tex
xelatex bodcover.tex
xelatex bodcover.tex
mv bodcover.pdf bod
./filluppages 4 main.pdf bod/bodcontent.pdf
# prepare for submission to createspace
createspace: main.pdf
sed "s/output=short/output=covercreatespace/" main.tex >createspacecover.tex
xelatex createspacecover.tex
xelatex createspacecover.tex
mv createspacecover.pdf createspace
./filluppages 1 main.pdf createspace/createspacecontent.pdf
#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 \
*.glg *.glo *.gls *.wrd *.wdv *.xdv \
*.run.xml
realclean: clean
rm -f *.dvi *.ps *.pdf