generated from jtr13/bookdown-template
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy path_render_book.R
More file actions
41 lines (30 loc) · 1.42 KB
/
_render_book.R
File metadata and controls
41 lines (30 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Packages ----------------------------------------------------------------
library(bookdown)
library(knitr)
library(tictoc)
# Clean files -------------------------------------------------------------
options(bookdown.clean_book = TRUE)
bookdown::clean_book()
rmarkdown::clean_site(preview = FALSE)
# Update ecodados
# remotes::install_github(repo = "paternogbc/ecodados", force = TRUE)
# Template
download.file(url = "https://raw.githubusercontent.com/paternogbc/livro_aer/master/templates/bs4_book.html",
destfile = paste0(system.file("templates", package = "bookdown"), "/bs4_book.html"), mode = "wb")
# Render html -------------------------------------------------------------
# tic()
# rmarkdown::render_site(output_format = 'bookdown::gitbook', encoding = 'UTF-8')
# toc()
# Render BS4 -------------------------------------------------------------
tictoc::tic()
rmarkdown::render_site(output_format = 'bookdown::bs4_book', encoding = 'UTF-8')
tictoc::toc()
# Render pdf -------------------------------------------------------------
# tictoc::tic()
# rmarkdown::render_site(output_format = 'bookdown::pdf_document2', encoding = 'UTF-8')
# tictoc::toc()
# Render word -------------------------------------------------------------
# tictoc::tic()
# rmarkdown::render_site(output_format = 'bookdown::word_document2', encoding = 'UTF-8')
# tictoc::toc()
# end ---------------------------------------------------------------------