aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.bookup20
-rw-r--r--_output.yml6
-rw-r--r--templates/_output.yml6
3 files changed, 28 insertions, 4 deletions
diff --git a/Makefile.bookup b/Makefile.bookup
index 37212f6..5015ad8 100644
--- a/Makefile.bookup
+++ b/Makefile.bookup
@@ -155,7 +155,7 @@ bookdown_html:
@cp vendor/bookup/vendor/Fuse.js/dist/fuse.min.js $(OUTPUT_FOLDER)/js
@find $(OUTPUT_FOLDER) -name *.html -exec sed -i -e 's|https://cdn.jsdelivr.net/npm/fuse.js@[^"]*|js/fuse.min.js|' {} \;
- # Add revision information
+ # Add revision information
@echo $(REVISION) > $(OUTPUT_FOLDER)/revision
# Add symlink to the archive and to the slides
@@ -183,15 +183,27 @@ bookdown_epub:
# Fix margin notes
@#sed -e 's/r tufte::margin_note/marginfigure/' $(OUTPUT).md > $(OUTPUT).new && mv $(OUTPUT).new $(OUTPUT).md
- # Build
+ # 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
+ @#Rscript -e 'bookdown::render_book("$(OUTPUT).md", "bookdown::html_document2")'
+ @#pandoc -f html -t epub3 -o $(OUTPUT).epub _main.html
+
# Move
@##mv _book/_main.epub $(OUTPUT)/$(OUTPUT).epub
- @#mv _book/_main.epub $(OUTPUT_FOLDER)/$(OUTPUT)s.epub
+ @#mv _book/_main.epub $(OUTPUT_FOLDER)/$(OUTPUT).epub
+ @#mv $(OUTPUT).epub $(OUTPUT_FOLDER)/$(OUTPUT).epub
# Cleanup
- @#rm _book/reference-keys.txt
+ @#rm -f _book/reference-keys.txt
@#rmdir _book
bookdown_odt:
diff --git a/_output.yml b/_output.yml
index db47c66..0737d12 100644
--- a/_output.yml
+++ b/_output.yml
@@ -128,3 +128,9 @@ bookdown::odt_document2:
# It conflicts with bibliographical citations
# Check ChangeLog entry from 2024-03-24 on the `ensaios` repository
md_extensions: -example_lists
+
+bookdown::html_document2:
+ # Make sure to disable Pandoc's example_lists extension
+ # It conflicts with bibliographical citations
+ # Check ChangeLog entry from 2024-03-24 on the `ensaios` repository
+ md_extensions: -example_lists
diff --git a/templates/_output.yml b/templates/_output.yml
index 26d6472..544cc4c 100644
--- a/templates/_output.yml
+++ b/templates/_output.yml
@@ -128,3 +128,9 @@ bookdown::odt_document2:
# It conflicts with bibliographical citations
# Check ChangeLog entry from 2024-03-24 on the `ensaios` repository
md_extensions: -example_lists
+
+bookdown::html_document2:
+ # Make sure to disable Pandoc's example_lists extension
+ # It conflicts with bibliographical citations
+ # Check ChangeLog entry from 2024-03-24 on the `ensaios` repository
+ md_extensions: -example_lists