diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-08-08 17:50:13 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2020-08-08 17:50:13 -0400 |
commit | f6a9687a80d3bfcf86079305320d4930f72295a8 (patch) | |
tree | d793682f86d421d92e2974bce6d36c0af7eeeb2c /pandoc.mk | |
parent | 94a78e0db2e82ae3b733e0e46d49cfe9aeddfeae (diff) | |
download | makefile_templates-f6a9687a80d3bfcf86079305320d4930f72295a8.tar.gz makefile_templates-f6a9687a80d3bfcf86079305320d4930f72295a8.zip |
pandoc: added stripper of first empty lines (left after preprocessor substitution)
Diffstat (limited to 'pandoc.mk')
-rw-r--r-- | pandoc.mk | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -25,6 +25,8 @@ docx_from_md_dest_targets = $(docx_from_md:%=$(dest_dir_md)/%) #PANDOC_PREPROCESSOR_CMD ?= cat #PANDOC_PREPROCESSOR_OPTIONS ?= +STRIP_FIRST_EMPTY_LINES ?= sed '/./,$$!d' + # preprocessor on PANDOC_PREPROCESSOR_CMD ?= gpp PANDOC_PREPROCESSOR_OPTIONS ?= -U "" "" "(" "," ")" "(" ")" "\#" "\\" -M "<\#" "\n" " " " " "\n" "(" ")" @@ -88,16 +90,16 @@ docx_md: $(docx_from_md) $(html_from_md): %.html : %.md $(md_fig_files) $(md_configs) $(md_includes) - $(PANDOC_PREPROCESSOR) $< | $(PANDOC_HTML_METADATA) | $(PANDOC) -t html5 $(PANDOC_HTML_OPTIONS) -o $@ + $(PANDOC_PREPROCESSOR) $< | $(STRIP_FIRST_EMPTY_LINES)| $(PANDOC_HTML_METADATA) | $(PANDOC) -t html5 $(PANDOC_HTML_OPTIONS) -o $@ $(tex_from_md): %.tex : %.md $(md_fig_files) $(md_configs) $(md_includes) - $(PANDOC_PREPROCESSOR) $< | $(PANDOC_TEX_METADATA) | $(PANDOC) -t latex $(PANDOC_TEX_OPTIONS) -o $@ + $(PANDOC_PREPROCESSOR) $< | $(STRIP_FIRST_EMPTY_LINES)| $(PANDOC_TEX_METADATA) | $(PANDOC) -t latex $(PANDOC_TEX_OPTIONS) -o $@ $(pdf_from_md): %.pdf : %.md $(md_fig_files) $(md_configs) $(md_includes) - $(PANDOC_PREPROCESSOR) $< | $(PANDOC_PDF_METADATA) | $(PANDOC) $(PANDOC_PDF_OPTIONS) -o $@ + $(PANDOC_PREPROCESSOR) $< | $(STRIP_FIRST_EMPTY_LINES)| $(PANDOC_PDF_METADATA) | $(PANDOC) $(PANDOC_PDF_OPTIONS) -o $@ $(docx_from_md): %.docx : %.md $(md_fig_files) $(md_configs) $(md_includes) - $(PANDOC_PREPROCESSOR) $< | $(PANDOC_DOCX_METADATA) | $(PANDOC) $(PANDOC_DOCX_OPTIONS) -o $@ + $(PANDOC_PREPROCESSOR) $< | $(STRIP_FIRST_EMPTY_LINES)| $(PANDOC_DOCX_METADATA) | $(PANDOC) $(PANDOC_DOCX_OPTIONS) -o $@ install_md_src: $(md_src_dest_targets) install_md_fig_files |