通用模板:https://github.com/rstudio/bookdown-demo
http://www.math.pku.edu.cn/teachers/lidf/docs/Rbook/html/_Rbook/bookdown.html#bookdown-intro
下载到本地解压
推荐使用Rstudio,因为是自带pandoc
install.packages("bookdown")
install.packages("tinytex")
这个直接查看版本就可
knit
bookdown::render_book("index.Rmd",
output_format="bookdown::gitbook", encoding="UTF-8")
bookdown::publish_book(render = "local")
{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(tidyverse) # Wickham的数据整理的整套工具 pdf.options(height=10/2.54, width=10/2.54, family="GB1") # 注意:此设置要放在最后
https://gaowenxin95.github.io/first-bookdown-demo/use-bookdown/index.html
原文:https://www.cnblogs.com/gaowenxingxing/p/12250945.html