Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generate two versions of the same latex document
.PHONY: all
all: tutorial.pdf tutorial-solns.pdf
%.pdf: %.tex
pdflatex $^
%-solns.pdf: %.tex
pdflatex -jobname $(basename $@) '\def\SOLUTIONS{} \input{$^}'
.PHONY: clean
rm -f *.aux *.log *.pdf
\newcommand{\solution}[1]{\textbf{Solution:} #1}
Job name: `\jobname'.\\
\solution{Just use makefiles!}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment