-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 1.01 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
project = tongji-thesis
all: paper clean
paper:
quarto render --output-dir outputs
%:
quarto render --output-dir outputs --to $*
# make release-<version>
release-%:
mkdir -p releases/$*
quarto render --output-dir releases/$*
cp $(project).tex releases/$*/$(project).tex
cp tongjithesis.cfg tongjithesis.cls tongjiutils.sty releases/$*/
cp tongji-whole-logo.pdf releases/$*/
cp bibliography.bib releases/$*/
echo $* > releases/VERSION
# make diff previous=<previous release> current=<current release>
diff:
cd releases/$(current) && latexdiff --graphics-markup=none --math-markup=whole ../$(previous)/$(project).tex $(project).tex > $(project)-diff-$(previous)-$(current).tex
cd releases/$(current) && xelatex $(project)-diff-$(previous)-$(current).tex
cd releases/$(current) && biber $(project)-diff-$(previous)-$(current).aux || true
cd releases/$(current) && xelatex $(project)-diff-$(previous)-$(current).tex
cd releases/$(current) && xelatex $(project)-diff-$(previous)-$(current).tex
clean:
git clean -Xdf