diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2026-02-26 21:56:57 -0300 |
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2026-02-26 21:56:57 -0300 |
| commit | b0aa3e96dc8667e250b77999e12c0c5fce56720b (patch) | |
| tree | db5bb16604ac8c224f287e658a9a7df06383381a | |
| parent | 61c3489b0f327a7f7ae6c91bd2f0f69a683728bc (diff) | |
| download | bookup-main.tar.gz bookup-main.tar.bz2 | |
Fix: epub: try approach with bookdown::html_document2 plus pandoc conversionmain
| -rw-r--r-- | Makefile.bookup | 20 | ||||
| -rw-r--r-- | _output.yml | 6 | ||||
| -rw-r--r-- | templates/_output.yml | 6 |
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 |
