summaryrefslogtreecommitdiffstats
path: root/presentations/common-goods/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'presentations/common-goods/Makefile')
-rw-r--r--presentations/common-goods/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/presentations/common-goods/Makefile b/presentations/common-goods/Makefile
new file mode 100644
index 0000000..68df7fe
--- /dev/null
+++ b/presentations/common-goods/Makefile
@@ -0,0 +1,58 @@
+notes = \
+ eek-2017-09-common-goods-notes-sv.pdf
+
+other = \
+ proposal-en.pdf \
+ proposal-sv.pdf \
+ script.pdf
+
+all: $(notes) $(other)
+
+
+%-notes-sv.pdf: script-sv_.pdf
+ echo '$(tex-includepdf-nup)' | pdflatex -jobname $(basename $@)
+
+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
+
+script-sv_.pdf: script-sv_.tex
+ jobname=$(basename $@) ;\
+ echo "Rerun right" >> $(basename $@).log ;\
+ for i in {0..4}; do \
+ if grep -q 'Rerun.*right' $(basename $@).log; then \
+ pdflatex -jobname $(basename $@) $<;\
+ fi ;\
+ done
+
+script-sv_.tex: script-sv.mdwn latex.sed
+ pandoc -s -S -f markdown -t latex \
+ -V "classoption=a4paper,12pt" \
+ -V "geometry=paperwidth=.5\paperwidth,hmargin=10mm,top=15mm,bottom=15mm,includefoot" \
+ < $< \
+ | sed -f latex.sed > $@
+
+
+
+$(other): %.pdf: %.mdwn
+ pandoc -s -S -f markdown -t latex \
+ -V "classoption=a4paper,12pt" \
+ -V "geometry=hmargin=35mm,top=20mm,bottom=15mm,includefoot" \
+ -o $(basename $<).pdf $<
+
+clean:
+ rm -f $(notes)
+ rm -f *.aux *.log
+ rm -f *.tex
+ rm -f *.pdf
+ rm -f *~ *_.* *_
+
+
+SHELL = /bin/bash
+