From b1372687cd9d952bde4792fbc308fe7b4cea7afb Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Mon, 5 Oct 2015 00:42:47 +0200 Subject: Initial commit on fri-demokratisk presentation --- presentations/fri-demokratisk/Makefile | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 presentations/fri-demokratisk/Makefile (limited to 'presentations/fri-demokratisk/Makefile') diff --git a/presentations/fri-demokratisk/Makefile b/presentations/fri-demokratisk/Makefile new file mode 100644 index 0000000..e18abb3 --- /dev/null +++ b/presentations/fri-demokratisk/Makefile @@ -0,0 +1,54 @@ +SHELL = /bin/bash + +AUTHOR = eek +DATE = 2015-10 +VERSION = draft + +all: notes posters images + +author := $(AUTHOR) +date := $(DATE) +base := $(notdir $(shell pwd)) +version := $(VERSION) +pre = $(author)-$(date)-$(base) +suf = $(version) + +notes: $(pre)-notes-$(suf).pdf + +posters: $(pre)-posters-$(suf).pdf + +IMAGES = Richard_Stallman_at_Marlboro_College.jpg Heckert_GNU.png Tux.pdf + +$(IMAGES): + make -C images $@ + +$(pre)-notes-$(suf).tex: script.mdwn + pandoc -s -f markdown -t latex -V classoption=a4paper,twocolumn,11pt -V geometry=left=10mm,right=15mm,top=20mm,bottom=15mm,includefoot < $< |\ + sed '/{geometry}/ a \\\\setlength\\columnsep{25mm}\\setlength\\columnseprule{0pt}' |\ + sed '/\\subtitle/ i \\\newcommand{\\subtitle}[1]{}'> $@ + +$(pre)-posters-$(suf).tex: posters.tex + sed "/input.bib/ s/bib/$(pre)-bib-$(suf)/" < $< > $@ + +$(pre)-bib-$(suf).tex: $(pre)-notes-$(suf).tex + sed -n '/subsection.Den som vill veta mer/,/subsection/ p' < $< | sed '1,2 d; $$ d' > $@ + +$(pre)-posters-$(suf).pdf: $(pre)-posters-$(suf).tex $(pre)-bib-$(suf).tex $(IMAGES) + jobname=$(basename $@) ;\ + latex_count=5 ;\ + latex_log=$$jobname.log ;\ + pdflatex -jobname $$jobname $< ;\ + while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$latex_log && [ $$latex_count -gt 0 ] ;\ + do echo "Rerunning latex...." ; pdflatex -jobname $$jobname $< ;\ + latex_count=`expr $$latex_count - 1`;\ + done; + +%.pdf: %.tex + jobname=$(basename $@) ;\ + latex_count=5 ;\ + latex_log=$$jobname.log ;\ + pdflatex -jobname $$jobname $< ;\ + while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$latex_log && [ $$latex_count -gt 0 ] ;\ + do echo "Rerunning latex...." ; pdflatex -jobname $$jobname $< ;\ + latex_count=`expr $$latex_count - 1`;\ + done; -- cgit v1.2.3