summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2016-10-05 09:50:24 +0800
committerIru Cai <mytbk920423@gmail.com>2016-10-05 09:50:24 +0800
commit45215184b690f1e6d166f62c47139f54849f607a (patch)
tree911c922d474bbeccd84fff511563cfe40753464b /Makefile
parentcffdab4704a90602d955396f7441211f04985d70 (diff)
downloadfsfs-zh-45215184b690f1e6d166f62c47139f54849f607a.tar.xz
use pandoc to generate tex files
Multimarkdown generates bad tex files, so use pandoc instead, and we can continue to use the original template.
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile7
1 files changed, 4 insertions, 3 deletions
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