Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the ebook functions epub_book and kindlegen() for existing bookdown documents?

I've found a couple bookdown documents on github (namely Hadley's R for Data Science and Efficient R) that I'd like to build from source as ebooks. Bookdown, which the documents are written in, has a couple functions, namely epub_book() and kindlegen() to build a ebook (rather than github book site), which I'd like to use so I can read the books on my Kindle.

I've looked at the bookdown documentation for those functions, but I don't understand how/where to use those functions to build the ebook files and/or if there are output options already written in the code that I need to edit.

like image 701
crazybilly Avatar asked May 19 '17 15:05

crazybilly


1 Answers

They are the structure. You should do something like this

render_book("file.Rmd", epub_book())

to build the ebook. Some variables can be passed to epub_book().

You could take a look to https://bookdown.org/yihui/bookdown/ . It is a book about bookdown written in bookdown.

like image 127
Javi_VM Avatar answered Oct 31 '22 20:10

Javi_VM