summaryrefslogtreecommitdiffstats
path: root/presentations/common-goods/Makefile
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@etraveli.com>2018-02-11 10:11:47 +0100
committerGustav Eek <gustav.eek@etraveli.com>2018-02-11 10:11:47 +0100
commite3a4aa29a05ae7e96709d5b9bb547fed57b9f7d9 (patch)
treec5eb5cc97dc2096b05c9ab3f4f0b80a67361d161 /presentations/common-goods/Makefile
parenta5827bb1737c35da40397daaa372e8e59fca663e (diff)
parent2a0e99bfd6b73e33843780aaa54ad4a8db4c44dc (diff)
Merge branch 'presentation-common-goods' into dfrige-presentation-dfri
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
+