-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
42 lines (31 loc) · 1.02 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
# modified from SJTU THESIS PROJECT
THESIS = sztuthesis_main
# TEX, BIB, TEST dir
TEX_DIR = content
BIB_DIR = .
# Option for latexmk
LATEXMK_OPT_BASE = -xelatex -gg -silent
LATEXMK_OPT = $(LATEXMK_OPT_BASE) -f
LATEXMK_OPT_PVC = $(LATEXMK_OPT_BASE) -pvc
all: $(THESIS).pdf
.PHONY : all cleanall pvc view wordcount git zip
$(THESIS).pdf : $(THESIS).tex $(TEX_DIR)/*.tex $(BIB_DIR)/*.bib SZTUthesis.cls Makefile
-latexmk $(LATEXMK_OPT) $(THESIS)
pvc :
latexmk $(LATEXMK_OPT_PVC) $(THESIS)
view : $(THESIS).pdf
#Mac user
open $<
#Linux user
#xdg-open $<
wordcount:
@texcount $(THESIS).tex -inc -ch-only | awk '/total/ {getline; print "纯中文字数\t\t\t:",$$4}'
@texcount $(THESIS).tex -inc -chinese | awk '/total/ {getline; print "总字数(英文单词 + 中文字)\t:",$$4}'
clean :
-@latexmk -c -silent 2> /dev/null
-@rm -f $(TEX_DIR)/*.aux 2> /dev/null || true
cleanall :
-@latexmk -C -silent 2> /dev/null
-@rm -f $(TEX_DIR)/*.aux 2> /dev/null || true
zip :
git archive --format zip --output thesis.zip master