SOURCES = $(wildcard *.tex) 
TIDIES = $(SOURCES:.tex=.tidied)

.PHONY: all 

main.pdf: $(TIDIES)
	# compile .tex file.
	#docker run --rm -it -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" m1dnight/latex:2019 latexmk -pdf main.tex > /dev/null
	echo "Compiling pdf"

tidy: $(TIDIES)

%.tidied: %.tex
	echo "Tidy ${<}"
	# indent .tex file
	# docker run --rm -it -v "$(CURDIR):$(CURDIR)" -w "$(CURDIR)" m1dnight/latex:2019 latexindent -w $< > /dev/null
	touch $@