-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexport_book.R
39 lines (25 loc) · 966 Bytes
/
export_book.R
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
file.remove("PfP_Book.md")
### HTML
bookdown::render_book("_bookdown.yml", output_format = "bookdown::gitbook",
clean = TRUE,
output_dir = "docs/",
encoding = "UTF-8")
# bookdown::publish_book(render = "local")
### Epub
bookdown::render_book("_bookdown.yml",
output_format = "bookdown::epub_book",
clean = TRUE,
output_dir = "docs/",
encoding = "UTF-8")
### Kindle
# bookdown::kindlegen(epub = "Epub/")
### Word
bookdown::render_book("_bookdown.yml", output_format = "bookdown::word_document2", clean = T,
output_dir = "DOC/",
encoding = "UTF-8")
### PDF
bookdown::render_book("_bookdown.yml",
output_format = "bookdown::pdf_book",
clean = T,
output_dir = "docs/",
encoding = "UTF-8")