From 5e6f037190eb203943287895374f89202d9eb29c Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 13 Mar 2015 23:30:15 -0400 Subject: pandoc better handles metadata --- pandoc.mk | 15 ++++++++++----- 1 file 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: -- cgit v1.2.3