Skip to content

Instantly share code, notes, and snippets.

@liuhoward
Forked from gpoo/Makefile
Created October 26, 2017 21:11
Show Gist options
  • Save liuhoward/8efe56d6b12c64eae79cd8449a0bc879 to your computer and use it in GitHub Desktop.
Save liuhoward/8efe56d6b12c64eae79cd8449a0bc879 to your computer and use it in GitHub Desktop.
A Makefile to compile latex slides and build handouts (assuming the use of beamer)
latexfile = openaccess
LATEX = xelatex
$(latexfile).pdf: $(latexfile).tex
$(LATEX) $<
notes: $(latexfile)_withnotes.pdf
all: $(latexfile).pdf notes
$(latexfile)_withnotes.pdf: $(latexfile)_withnotes.tex
$(LATEX) $<
pdfnup $@ --nup 1x2 --no-landscape --paper letterpaper --frame true --scale 0.9 --outfile $@
$(latexfile)_withnotes.tex: $(latexfile).tex
sed -e '/^\\setbeameroption/ s/hide notes/show notes/' -e '/^\\documentclass/ s/\]/,handout\]/' $< > $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment