From c9f3bee30533a2cd11fa9ef9411c3cdd5f1af317 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 24 Jun 2023 11:53:02 +0200 Subject: improve the build system * Allow pandoc to format references in a numerical format * Introduce a new solution latex macro using phantom --- common.mk | 4 +- latex/common.tex | 1 + pandoc/din-1505-2-numeric-alphabetical.csl | 355 +++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+), 1 deletion(-) create mode 100644 pandoc/din-1505-2-numeric-alphabetical.csl diff --git a/common.mk b/common.mk index 2e2602ed..8290d85e 100644 --- a/common.mk +++ b/common.mk @@ -9,7 +9,9 @@ LATEX_BASE := $(MAKEFILE_DIR)latex PANDOC_FILTER_DIR := $(MAKEFILE_DIR)pandoc COMMON_IMAGES := $(LATEX_BASE)/images -COMMON_PANDOC_OPTIONS := --pdf-engine=lualatex --resource-path="$(COMMON_IMAGES):." --lua-filter "$(PANDOC_FILTER_DIR)/center-img.lua" --lua-filter "$(PANDOC_FILTER_DIR)/include-files.lua" +PANDOC_CITE_OPTIONS := --citeproc --csl=$(PANDOC_FILTER_DIR)/din-1505-2-numeric-alphabetical.csl +PANDOC_FILTER_OPTIONS := --lua-filter "$(PANDOC_FILTER_DIR)/center-img.lua" --lua-filter "$(PANDOC_FILTER_DIR)/include-files.lua" +COMMON_PANDOC_OPTIONS := --pdf-engine=lualatex --resource-path="$(COMMON_IMAGES):." $(PANDOC_CITE_OPTIONS) $(PANDOC_FILTER_OPTIONS) PANDOC := pandoc $(COMMON_PANDOC_OPTIONS) SLIDES_OPTIONS := --slide-level 2 -t beamer --pdf-engine-opt=--shell-escape diff --git a/latex/common.tex b/latex/common.tex index 926b9262..2d2efbea 100644 --- a/latex/common.tex +++ b/latex/common.tex @@ -21,6 +21,7 @@ \newcommand{\iflehrer}[2]{\iftoggle{lehrerversion}{#1}{#2}} \newcommand{\solution}[1]{\iftoggle{lehrerversion}{#1}{\textcolor{white}{#1}}} +\newcommand{\psolution}[1]{\iftoggle{lehrerversion}{#1}{\phantom{#1}}} \newcommand{\gap}[1]{\underLine{\solution{#1}}} diff --git a/pandoc/din-1505-2-numeric-alphabetical.csl b/pandoc/din-1505-2-numeric-alphabetical.csl new file mode 100644 index 00000000..e81b695a --- /dev/null +++ b/pandoc/din-1505-2-numeric-alphabetical.csl @@ -0,0 +1,355 @@ + + -- cgit v1.2.3