From 8904b646400c4555e2243de423a3f1198f0b81a9 Mon Sep 17 00:00:00 2001
From: "J.F.J. Laros" <j.f.j.laros@lumc.nl>
Date: Mon, 13 Apr 2015 22:29:37 +0200
Subject: [PATCH] Added beamer handout target.

---
 Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1ad17cd..d032670 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ PIC := $(foreach I, $(PIC_EXT), $(basename $(shell ls *.$I)))
 PDF := $(addsuffix .pdf, $(SRC))
 RTF := $(addsuffix .rtf, $(SRC))
 DOC := $(addsuffix .docx, $(SRC))
+HDT := $(addsuffix _handout.pdf, $(SRC))
 
 # Temporary files.
 TMP := blg log nav out snm toc dvi aux idx vrb ps glg glo ist
@@ -66,11 +67,13 @@ rtf: $(RTF)
 
 doc: $(DOC)
 
+handout: $(HDT)
+
 clean:
-	rm -f $(foreach I, $(TMP), $(addsuffix .$I, $(SRC))) $(PNG) $(TNP)
+	rm -f $(foreach I, $(TMP), $(addsuffix .$I, $(SRC))) $(foreach I, $(TMP), $(addsuffix _handout.$I, $(SRC))) $(PNG) $(TNP)
 
 distclean: clean
-	rm -f $(PDF) $(RTF) $(DOC) $(BIB) $(EPS) $(TEX_T)
+	rm -f $(PDF) $(RTF) $(DOC) $(HDT) $(BIB) $(EPS) $(TEX_T)
 
 release: all clean
 
@@ -205,3 +208,6 @@ release: all clean
 
 %.docx: %.rtf
 	$(LIBREOFFICE) --headless --invisible --convert-to docx $< -o $@
+
+%_handout.tex: %.tex
+	sed 's/^\\documentclass\[/\\documentclass\[handout, /' $< > $@
-- 
GitLab