diff options
Diffstat (limited to 'notes/mathe2/makefile')
-rw-r--r-- | notes/mathe2/makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/notes/mathe2/makefile b/notes/mathe2/makefile new file mode 100644 index 0000000..895c28d --- /dev/null +++ b/notes/mathe2/makefile @@ -0,0 +1,31 @@ +VIEW = zathura + +all: + @mkdir -p build/ + @pandoc main.md --filter pandoc-latex-environment --toc -N -V fontsize=11pt -V geometry:a4paper -V geometry:margin=2.5cm -o $(CURDIR)/build/main.tex --pdf-engine-opt=-shell-escape -H header.tex -B title.tex >/dev/null + @(pdflatex -shell-escape -halt-on-error -output-directory $(CURDIR)/build/ $(CURDIR)/build/main.tex | grep '^!.*' -A200 --color=always ||true) & + @progress 3 pdflatex + @cp build/main.pdf . &>/dev/null + @echo done. + +exam: + @mkdir -p build/ + @pandoc exam.md --filter pandoc-latex-environment --toc -N -V fontsize=11pt -V geometry:a4paper -V geometry:margin=2.5cm -o $(CURDIR)/build/exam.tex --pdf-engine-opt=-shell-escape -H header.tex -B examtitle.tex >/dev/null + @(pdflatex -shell-escape -halt-on-error -output-directory $(CURDIR)/build/ $(CURDIR)/build/exam.tex | grep '^!.*' -A200 --color=always ||true) & + @progress 1 pdflatex + @cp build/exam.pdf . &>/dev/null + @echo done. + +part: + @mkdir -p build/ + @pandoc part.md --filter pandoc-latex-environment -N -V fontsize=11pt -V geometry:a4paper -V geometry:margin=2.5cm -o $(CURDIR)/build/main.tex --pdf-engine-opt=-shell-escape -H header.tex >/dev/null + @(pdflatex -shell-escape -halt-on-error -output-directory $(CURDIR)/build/ $(CURDIR)/build/main.tex | grep '^!.*' -A200 --color=always ||true) & + @progress 1 pdflatex + @echo done. + +clean: + @$(RM) -rf build + +run: all + @clear + @$(VIEW) build/main.pdf |