From ba8dcd811a1dfff39b73e360bca8a5053fda4ebc Mon Sep 17 00:00:00 2001 From: Dominik Becker Date: Sun, 14 Feb 2021 11:26:12 +0100 Subject: [PATCH] #50 added Lua filter for german quoation marks with to babel / csquotes --- build.sh | 2 +- templates/germanquotes.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 templates/germanquotes.lua diff --git a/build.sh b/build.sh index cc67e37..6889bcb 100755 --- a/build.sh +++ b/build.sh @@ -12,7 +12,7 @@ fi if [ $1 == "pandoc" ] then cat chapter/*.md > chapter/out.md - pandoc --citeproc --filter pandoc-crossref \ + pandoc --lua-filter templates/germanquotes.lua --citeproc --filter pandoc-crossref \ -M cref=true --top-level-division=chapter \ --bibliography library/library.bib --biblatex \ -o chapter/out.tex chapter/out.md diff --git a/templates/germanquotes.lua b/templates/germanquotes.lua new file mode 100644 index 0000000..66e82f2 --- /dev/null +++ b/templates/germanquotes.lua @@ -0,0 +1,6 @@ +-- see https://github.com/jgm/pandoc/issues/5470#issuecomment-489158514 +function Quoted(el) + if el.quotetype == 'DoubleQuote' then + return {pandoc.Str("„"), pandoc.Span(el.content), pandoc.Str("“")} + end + end \ No newline at end of file