Created
June 3, 2017 05:15
-
-
Save deecewan/bb778a089586dee58928cef386e60018 to your computer and use it in GitHub Desktop.
Makefile for a pandoc project converting markdown to latex
This file contains hidden or 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
SHELL=zsh | |
.PHONY: all copy clean | |
all: copy out/main.tex | |
clean: | |
rm -r out/* | |
copy: | |
zsh -c 'setopt extendedglob; cp -r src/^(template.tex|*.md) out/' | |
src/%.md: | |
pandoc\ | |
-o out/main.tex\ | |
--toc\ | |
--to latex\ | |
--from markdown\ | |
--template src/template.tex\ | |
--latex-engine xelatex\ | |
--biblatex\ | |
--bibliography src/bib.bib\ | |
src/*_*.md | |
out/main.tex: src/%.md | |
cd out/ && \ | |
xelatex -interaction=nonstopmode main > /dev/null && \ | |
biber main > /dev/null && \ | |
xelatex -interaction=nonstopmode main > /dev/null && \ | |
xelatex -interaction=nonstopmode main > /dev/null && \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment