From 222114d8ad75455b461b7e8bd458072d56429b78 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 6 Jun 2024 12:35:04 -0300 Subject: Feat: support for customizing the PDF and HTML styles --- Makefile.bookup | 11 +++++++---- 1 file 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 -- cgit v1.2.3