NOTEBOOKS := $(shell find . -path ./req -prune -o -name "*.mdi" -print | sed -e "s/\.mdi$$/.html/g")

.PHONY: all
all: $(NOTEBOOKS)

.DEFAULT_GOAL := all

PDARGS := --standalone --mathml -F truthTables.py -F tableStyles.py -F discoveryPrompts.py -F learningGoals.py --syntax-definition asm.xml --highlight-style pygments
MDFROM := --from=markdown+smart+footnotes

req:
	mkdir req

%.html: %.mdi req/template.html req/notebook.css
	pandoc $< $(PDARGS) $(MDFROM) --to=html --template=req/template.html --css=req/notebook.css --output=$@
