summaryrefslogtreecommitdiff
path: root/pandoc.mk
diff options
context:
space:
mode:
Diffstat (limited to 'pandoc.mk')
-rw-r--r--pandoc.mk15
1 files changed, 10 insertions, 5 deletions
diff --git a/pandoc.mk b/pandoc.mk
index be55d1d..c3f5117 100644
--- a/pandoc.mk
+++ b/pandoc.mk
@@ -19,10 +19,15 @@ PANDOC_PREPROCESSOR_CMD ?= gpp
PANDOC_PREPROCESSOR_OPTIONS ?= -U "" "" "(" "," ")" "(" ")" "\#" "\\" -M "<\#" "\n" " " " " "\n" "(" ")"
PANDOC_PREPROCESSOR ?= $(PANDOC_PREPROCESSOR_CMD) $(PANDOC_PREPROCESSOR_OPTIONS)
+PANDOC_HTML_METADATA ?= cat -
+PANDOC_TEX_METADATA ?= cat - $(CONFIG_DIR)/tex_metadata.yaml
+PANDOC_PDF_METADATA ?= $(PANDOC_TEX_METADATA)
+
PANDOC_COMMON_OPTIONS ?= --standalone --smart
-PANDOC_HTML_OPTIONS ?= -s --css=$(TOPDIR)/css_styles/evmik_pandoc.css --section-divs --toc
-PANDOC_TEX_OPTIONS ?=
+PANDOC_HTML_OPTIONS ?= -s --css=$(TOPDIR)/css_styles/evmik_pandoc.css --section-divs --toc
+PANDOC_TEX_OPTIONS ?= --latex-engine=pdflatex
PANDOC_PDF_OPTIONS ?= --latex-engine=pdflatex
+
PANDOC_CMD := pandoc
PANDOC := $(PANDOC_CMD) $(PANDOC_COMMON_OPTIONS)
@@ -37,13 +42,13 @@ tex_md: $(tex_from_md)
$(html_from_md): %.html : %.md $(md_fig_files) $(md_configs)
- $(PANDOC_PREPROCESSOR) $< | $(PANDOC) -t html $(PANDOC_HTML_OPTIONS) -o $@
+ $(PANDOC_PREPROCESSOR) $< | $(PANDOC_HTML_METADATA) | $(PANDOC) -t html $(PANDOC_HTML_OPTIONS) -o $@
$(tex_from_md): %.tex : %.md $(md_fig_files) $(md_configs)
- $(PANDOC_PREPROCESSOR) $< | $(PANDOC) -t latex $(PANDOC_TEX_OPTIONS) -o $@
+ $(PANDOC_PREPROCESSOR) $< | $(PANDOC_TEX_METADATA) | $(PANDOC) -t latex $(PANDOC_TEX_OPTIONS) -o $@
$(pdf_from_md): %.pdf : %.md $(md_fig_files) $(md_configs)
- $(PANDOC_PREPROCESSOR) $< | $(PANDOC) $(PANDOC_PDF_OPTIONS) -o $@
+ $(PANDOC_PREPROCESSOR) $< | $(PANDOC_PDF_METADATA) | $(PANDOC) $(PANDOC_PDF_OPTIONS) -o $@
dest_dir_md: