Skip to content

Instantly share code, notes, and snippets.

@gpoo
Created May 28, 2016 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gpoo/cbbfda7363b2b98981793b1b21956e89 to your computer and use it in GitHub Desktop.
Save gpoo/cbbfda7363b2b98981793b1b21956e89 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