-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathlatexmk.mk
29 lines (23 loc) · 799 Bytes
/
latexmk.mk
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
# This file is included by Makefile in subdirectories.
LATEXMK := latexmk
LATEXMK_FLAGS := -xelatex -shell-escape -interaction=nonstopmode -file-line-error
.PHONY: all gh-cp clean
all:
# Building $(FILENAME).pdf
ifdef CPNAME
@cp -p $(FILENAME).tex $(CPNAME).tex
$(LATEXMK) $(LATEXMK_FLAGS) $(CPNAME).tex
@rm -f $(CPNAME).tex
-@mv $(CPNAME).pdf $(FILENAME).pdf
else
$(LATEXMK) $(LATEXMK_FLAGS) $(FILENAME).tex
endif
gh-cp: all
cp -p $(FILENAME).pdf ../$(GH_ACTIONS_DIR)/$(CPNAME).pdf
clean:
rm -f *.aux *.log *.idx *.ind *.ilg *.thm *.toc *.blg *.bbl *.bcf *.out *.fls *.fdb_latexmk *.run.xml *.synctex.gz *.xdv *~ *.lof *.lot
ifdef CPNAME
rm -f $(CPNAME).pdf $(CPNAME).tex
endif
# indent
# for i in *.tex; do latexindent -m --GCString -l ../latexindent.yaml -g /dev/null -wd $i; done