diff options
-rw-r--r-- | pandoc.mk | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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: |