From 399651ce59692965f20d8cca72ef00d487d3289e Mon Sep 17 00:00:00 2001 From: Dominik Becker Date: Sun, 28 Jun 2020 23:59:13 +0200 Subject: [PATCH] #40 added build script --- build.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6a49098 --- /dev/null +++ b/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# cleanup +latexmk -C +if [ -f chapter/out.tex ] +then + rm chapter/out.md + rm chapter/out.tex +fi + +# run pandoc +if [ $1 == "pandoc"] +then + cat chapter/*.md > chapter/out.md + pandoc --filter pandoc-citeproc --filter pandoc-crossref \ + -M cref=true --top-level-division=chapter \ + --bibliography library/library.bib --biblatex \ + -o chapter/out.tex chapter/out.md +fi + +# run latex build +if [ $1 != "clean" ] +then + latexmk -latexoption="-shell-escape" main.tex +fi