Created
October 30, 2020 14:56
-
-
Save emilemathieu/de8a7ad8f6c8c129c5360bf79f75988f to your computer and use it in GitHub Desktop.
makefile for latex compiling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LATEX=pdflatex | |
LATEXOPT=--shell-escape | |
NONSTOP=--interaction=batchmode#--interaction=nonstopmode | |
LATEXMK=latexmk | |
LATEXMKOPT=-pdf | |
MAIN=main | |
all: clean | |
$(LATEXMK) $(LATEXMKOPT) $(NONSTOP) -pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN) | |
make clean | |
make split | |
clean: | |
$(LATEXMK) --c $(MAIN) | |
rm -rf *~ *.tmp | |
split: | |
pdftk $(MAIN).pdf cat 1-13 output core.pdf | |
pdftk $(MAIN).pdf cat 14-r1 output supplementary.pdf | |
.PHONY: all clean |
PS I usually use a much simpler Makefile
, texi2pdf
does the entire latex/bibtex/latex dance for you, and --tidy
puts all the aux files in a separate subfolder main.t2d
main :
texi2pdf --shell-escape --tidy main.tex
clean :
rm -rf main.t2d
make
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does
NONSTOP=--interaction=batchmode#--interaction=nonstopmode
do?