summaryrefslogtreecommitdiffstats
path: root/presentations/common-goods/Makefile
blob: a9a2ed9d69f379b9e1d069368b10e6d16a1844d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
notes = \
  eek-2017-09-common-goods-notes-sv.pdf

all: $(notes)

%-notes-sv.pdf: script-sv.mdwn
	pandoc -s -S -f markdown -t latex \
          -V "classoption=a4paper,12pt" \
          -V "geometry=paperwidth=.5\paperwidth,hmargin=8mm,top=10mm,bottom=15mm,includefoot" \
          -o $(basename $<)_.pdf $<
	echo '$(tex-includepdf-nup)' | pdflatex -jobname $(basename $@)
	rm $(basename $<)_.pdf

define tex-includepdf-nup
\documentclass[a4paper, 11pt]{article}\
\usepackage[a4paper, margin = 0pt]{geometry}\
\usepackage{pdfpages}\
\pagestyle{empty}\
\begin{document}\
\includepdf[pages = -, nup = 2x1]{$(basename $<)_.pdf}\
\end{document}
endef

clean:
	rm -f $(notes)
	rm -f *.aux *.log
	rm -f *.tex
	rm -f *.pdf
	rm -f *~



SHELL = /bin/bash