aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.bookup26
1 files changed, 13 insertions, 13 deletions
diff --git a/Makefile.bookup b/Makefile.bookup
index 5015ad8..58f5a90 100644
--- a/Makefile.bookup
+++ b/Makefile.bookup
@@ -180,29 +180,29 @@ bookdown_epub:
@# EPUB format is broken right now
@true
- # Fix margin notes
+ @# Fix margin notes
@#sed -e 's/r tufte::margin_note/marginfigure/' $(OUTPUT).md > $(OUTPUT).new && mv $(OUTPUT).new $(OUTPUT).md
- # Build using bookdown::epub_book
- #
- # Broken due to the following issues:
- #
- # * https://github.com/rstudio/bookdown/issues/1179
- # * https://github.com/rstudio/bookdown/issues/1387
- # * https://github.com/rstudio/bookdown/blob/main/NEWS.md#major-changes
- #
+ @# Build using bookdown::epub_book
+ @#
+ @# Broken due to the following issues:
+ @#
+ @# * https://github.com/rstudio/bookdown/issues/1179
+ @# * https://github.com/rstudio/bookdown/issues/1387
+ @# * https://github.com/rstudio/bookdown/blob/main/NEWS.md#major-changes
+ @#
@#Rscript -e 'bookdown::render_book("$(OUTPUT).md", "bookdown::epub_book")'
- # Build using bookdown::html_document2
+ @# Build using bookdown::html_document2
@#Rscript -e 'bookdown::render_book("$(OUTPUT).md", "bookdown::html_document2")'
- @#pandoc -f html -t epub3 -o $(OUTPUT).epub _main.html
+ @#pandoc --toc --toc-depth=2 -f html -t epub3 -o $(OUTPUT).epub _main.html
- # Move
+ @# Move
@##mv _book/_main.epub $(OUTPUT)/$(OUTPUT).epub
@#mv _book/_main.epub $(OUTPUT_FOLDER)/$(OUTPUT).epub
@#mv $(OUTPUT).epub $(OUTPUT_FOLDER)/$(OUTPUT).epub
- # Cleanup
+ @# Cleanup
@#rm -f _book/reference-keys.txt
@#rmdir _book