Skip to content
Snippets Groups Projects
Unverified Commit 06953664 authored by ck85nori's avatar ck85nori :railway_track:
Browse files

fixes pandoc version dependent engine option name

parent fea5d39b
No related branches found
No related tags found
No related merge requests found
......@@ -12,12 +12,20 @@ TITLE = title
# -----------------------------------------------------------------------------
PANDOC = pandoc
PANDOC_MAJOR_VERSION := \
$(shell pandoc -v | awk -F "[ .]" 'NR==1 { print $$2 }')
PANDOCFLAGS = \
ifeq ($(shell test $(PANDOC_MAJOR_VERSION) -lt 2; echo $$?), 0)
PANDOC_PDF_ENGINE_OPT_NAME = latex-engine
else
PANDOC_PDF_ENGINE_OPT_NAME = pdf-engine
endif
PANDOC_PDF_OPTIONS = \
--fail-if-warnings \
--standalone \
--filter pandoc-citeproc \
--pdf-engine=xelatex \
--$(PANDOC_PDF_ENGINE_OPT_NAME)=xelatex \
# -----------------------------------------------------------------------------
# sources
......@@ -43,7 +51,7 @@ $(SUBDIRS):
subdirs: $(SUBDIRS)
$(TITLE).pdf: $(SUBDIRS) metadata.yml $(SOURCES_CSV) $(SOURCES_MD)
$(PANDOC) $(PANDOCFLAGS) -o $@ metadata.yml $(SOURCES_MD)
$(PANDOC) $(PANDOC_PDF_OPTIONS) -o $@ metadata.yml $(SOURCES_MD)
check: spellcheck
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment