From 45215184b690f1e6d166f62c47139f54849f607a Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Wed, 5 Oct 2016 09:50:24 +0800 Subject: use pandoc to generate tex files Multimarkdown generates bad tex files, so use pandoc instead, and we can continue to use the original template. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 92fdeea..e50d86c 100755 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ METADATA = ebook/metadata.xml TOC = --toc --toc-depth=2 --epub-chapter-level=2 COVER_IMAGE = docs/cover.png LATEX_CLASS = book +PANDOC_TEX = pandoc -f markdown_mmd $(TOC) --latex-engine=xelatex -V documentclass=book TEMPLATE=./pdf PREFACES = docs/foreword-trans.md \ docs/foreword-v3.md \ @@ -93,9 +94,9 @@ $(BOOKNAME).html: $(PREFACES) $(CHAPTERS) $(APPENDIXS) mkdocs build --clean $(BOOKNAME).pdf: $(TITLE) $(PREFACES) $(CHAPTERS) $(APPENDIXS) - multimarkdown -t latex ${TEMPLATE}/meta.txt ${PREFACES} -o preface.tex - multimarkdown -t latex ${TEMPLATE}/meta.txt ${CHAPTERS} -o chapters.tex - multimarkdown -t latex ${TEMPLATE}/meta.txt ${APPENDIXS} -o appendix.tex + $(PANDOC_TEX) ${PREFACES} -o preface.tex + $(PANDOC_TEX) ${CHAPTERS} -o chapters.tex + $(PANDOC_TEX) ${APPENDIXS} -o appendix.tex ${call pdfgen} # pandoc $(TOC) --latex-engine=xelatex -V documentclass=$(LATEX_CLASS) --template=$(TEMPLATE) -o $@ $^ rm -fr fs-translations -- cgit v1.2.3