aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-06 12:35:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-06-06 12:35:04 -0300
commit222114d8ad75455b461b7e8bd458072d56429b78 (patch)
tree98d2929459855a8f8aa3ab69cb9c07c0d15f429c
parentdea63614016464fc5652ba0d7e8d1e6fb2e07ee1 (diff)
downloadbookup-222114d8ad75455b461b7e8bd458072d56429b78.tar.gz
bookup-222114d8ad75455b461b7e8bd458072d56429b78.tar.bz2
Feat: support for customizing the PDF and HTML styles
-rw-r--r--Makefile.bookup11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.bookup b/Makefile.bookup
index 8d7dae4..0c7c1be 100644
--- a/Makefile.bookup
+++ b/Makefile.bookup
@@ -20,8 +20,11 @@ OUTPUT ?= book
# Destination website hostname (for rsync+ssh)
WEBSITE ?= $(PROJECT)
-# Book style
-BOOK_STYLE ?= bookdown::tufte_book2
+# HTML style
+PDF_STYLE ?= bookdown::tufte_book2
+
+# HTML style
+HTML_STYLE ?= bookdown::gitbook
#
# Exclusion patterns
@@ -130,7 +133,7 @@ bookdown_html:
@#sed -e 's/\\\\citet{\([^}]*\)}/@\1/g' $(OUTPUT).md > $(OUTPUT).new && mv $(OUTPUT).new $(OUTPUT).md
# Build
- Rscript -e 'bookdown::render_book("$(OUTPUT).md", "bookdown::gitbook")'
+ Rscript -e 'bookdown::render_book("$(OUTPUT).md", "$(HTML_STYLE)")'
# Restore $(OUTPUT).md after the weird reference fix
@#mv $(OUTPUT).md.base $(OUTPUT).md
@@ -163,7 +166,7 @@ bookdown_pdf:
@rm -rf _book/_main.pdf
# Build
- @Rscript -e 'bookdown::render_book("$(OUTPUT).md", "$(BOOK_STYLE)")'
+ @Rscript -e 'bookdown::render_book("$(OUTPUT).md", "$(PDF_STYLE)")'
# Move
@#mv _main.pdf $(OUTPUT).pdf