docname = cottonalley

$(docname).pdf: *.tex
	latexmk -xelatex -outdir=./out/ $(docname).tex

slides: slides/*
	# Reveal.js
	pandoc "slides/cottonalley.md" \
		--to revealjs \
		--standalone \
		--self-contained \
		--variable theme="night" \
		--variable transition=fade \
		--variable transitionSpeed=fast \
		--variable slideNumber=true \
		--variable controlsLayout=edges \
		--variable controlsTutorial=false \
		--slide-level 2 \
		--default-image-extension "svg" \
		--resource-path "slides/" \
		--output "out/cottonalley-slides.html";
	# LaTeX
	pandoc "slides/cottonalley.md" \
		--to beamer \
		--pdf-engine=xelatex \
		--include-in-header "header.tex" \
		--variable theme="Copenhagen" \
		--slide-level 2 \
		--default-image-extension "pdf" \
		--resource-path "slides/" \
		--output "out/cottonalley-slides.pdf";

cluttex:
	mkdir -p ./out
	cluttex -e xelatex --biber --output=./out/ --watch $(docname).tex

clean:
	rm -rf ./out

