From: Gustav Eek Date: Sun, 13 Oct 2019 19:18:15 +0000 (+0200) Subject: [cache] PDF compilation infrastructure X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=d1c06bd7c24d101275662e6469f6389db175b21e;p=inbyggd-frihet-wiki.git [cache] PDF compilation infrastructure Add *Makefile* and Sed scripts for PDF-comilation via pandoc. Also update *.gitignore* --- diff --git a/cash/.gitignore b/cash/.gitignore new file mode 100644 index 0000000..a136337 --- /dev/null +++ b/cash/.gitignore @@ -0,0 +1 @@ +*.pdf diff --git a/cash/Makefile b/cash/Makefile new file mode 100644 index 0000000..6331bde --- /dev/null +++ b/cash/Makefile @@ -0,0 +1,21 @@ +ALL = \ + welcome-letter.pdf \ + tutorial.pdf \ + +all: $(ALL) + +OPTS = \ + -s -f markdown -t latex -V geometry=margin=2.5cm \ + -V classoption=12pt,a4paper -V links-as-notes \ + -V header-includes=\\usepackage{nopageno} + + +%.pdf: %.mdwn + cat $< |\ + sed -f sed/latex.sed |\ + pandoc $(OPTS) -o $@ + +clean: + rm -f $(ALL) + +.PHONO: all clean diff --git a/cash/sed/latex.sed b/cash/sed/latex.sed new file mode 100644 index 0000000..4bb2137 --- /dev/null +++ b/cash/sed/latex.sed @@ -0,0 +1,9 @@ +1,/^$/ { + 1 i --- + /^$/ i ... + s/^\[\[.*meta \(.*\)="\(.*\)".*$/\1: \2/ + /^title: / { + s/ -- /\\linebreak / + } +} +