Removing deprecation warning about --chapters
authorCraig Maloney <craig@decafbad.net>
Sun, 7 Feb 2021 19:26:21 +0000 (14:26 -0500)
committerCraig Maloney <craig@decafbad.net>
Sun, 7 Feb 2021 19:26:21 +0000 (14:26 -0500)
Makefile

index 7575b808cc2fcd357ba821747831f02cb42b0b96..d8a2cb6b3cee5be2b4b5bc091eea79e2a42d3b2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,11 +28,11 @@ pdf: $(BUILD)/pdf/$(BOOKNAME).pdf
 
 $(BUILD)/epub/$(BOOKNAME).epub: $(TITLE) $(CHAPTERS) $(METADATA_YAML)
        mkdir -p $(BUILD)/epub
-       pandoc -s $(TOC) --chapters --number-offset=0 -S --epub-metadata=$(METADATA_XML) --epub-cover-image=$(COVER_IMAGE) -o $@ $^
+       pandoc -s $(TOC) --top-level-division=chapter --number-offset=0 -S --epub-metadata=$(METADATA_XML) --epub-cover-image=$(COVER_IMAGE) -o $@ $^
 
 $(BUILD)/html/$(BOOKNAME).html: $(CHAPTERS) $(METADATA_YAML)
        mkdir -p $(BUILD)/html
-       pandoc -s $(TOC) --chapters --number-offset=0 --standalone --to=html5 --css=css/$(BOOKNAME).css -o $@ $^
+       pandoc -s $(TOC) --top-level-division=chapter --number-offset=0 --standalone --to=html5 --css=css/$(BOOKNAME).css -o $@ $^
 
 $(BUILD)/html/fonts/%: fonts/%
        mkdir -p $(BUILD)/html/fonts
@@ -45,6 +45,6 @@ $(BUILD)/html/css/%: css/%
 $(BUILD)/pdf/$(BOOKNAME).pdf: $(CHAPTERS) $(METADATA_YAML)
        mkdir -p $(BUILD)/pdf
        # pandoc $(TOC) --chapters --number-offset=0 --latex-engine=pdflatex -V documentclass=$(LATEX_CLASS) -V papersize=6x9 -o $@ $^
-       pandoc -s $(TOC) --chapters --number-offset=0 --template=Pandoc/templates/cs-6x9-pdf.latex --latex-engine=xelatex  -o $@ $^
+       pandoc -s $(TOC) --top-level-division=chapter --number-offset=0 --template=Pandoc/templates/cs-6x9-pdf.latex --latex-engine=xelatex  -o $@ $^
 
 .PHONY: all book clean epub html fonts css pdf