作者:Yihui Xie
译者:郑宝童
日期:2021.05.13
bookdown: Authoring Books and Technical Documents with R Markdown
bookdown:使用R Markdown编写书籍和技术文档
Yihui Xie
2021-05-10
Preface
前言
This short book introduces an R package, bookdown, to change your workflow of writing books. It should be technically easy to write a book, visually pleasant to view the book, fun to interact with the book, convenient to navigate through the book, straightforward for readers to contribute or leave feedback to the book author(s), and more importantly, authors should not always be distracted by typesetting details.
这本书介绍了一个R包,bookdown,来改变你写书的工作流程。它在技术上让写一本书更轻松,视觉上令人愉快地查看这本书,更乐于与这本书产生一系列交互,让读者更方便浏览这本书,并直接直接投稿或给作者留下反馈,更重要的是,作者不会总是被排版细节分心。
The bookdown package is built on top of R Markdown (http://rmarkdown.rstudio.com), and inherits the simplicity of the Markdown syntax (you can learn the basics in five minutes; see Section 2.1), as well as the possibility of multiple types of output formats (PDF/HTML/Word/…). It has also added features like multi-page HTML output, numbering and cross-referencing figures/tables/sections/equations, inserting parts/appendices, and imported the GitBook style (https://www.gitbook.com) to create elegant and appealing HTML book pages. This book itself is an example of how you can produce a book from a series of R Markdown documents, and both the printed version and the online version can look professional. You can find more examples at https://bookdown.org.
bookdown包构建在R Markdown (http://rmarkdown.rstudio.com)基础之上,并继承了Markdown语法的简单性(你可以在五分钟内学习基本知识;(参见第2.1节),以及多种输出格式(PDF/HTML/Word/…)。它还添加了多页HTML输出、编号和交叉引用图表/表格/章节/方程、插入部件/附录等功能,并导入GitBook风格(https://www.gitbook.com)来创建优雅而吸引人的HTML书籍页面。这本书本身就是一个例子,告诉你如何制作一本书
Despite the package name containing the word “book”, bookdown is not only for books. The “book” can be anything that consists of multiple R Markdown documents meant to be read in a linear sequence, such as course handouts, study notes, a software manual, a thesis, or even a diary. In fact, many bookdown features apply to single R Markdown documents as well (see Section 3.4).
尽管包的名称中包含“book”这个词,但bookdown并不仅仅是针对书籍的。“书”可以是由多个R Markdown文档组成的任何东西,这些文档以线性顺序阅读,比如课程讲义、学习笔记、软件手册、论文,甚至日记。事实上,许多记录功能也适用于单个R Markdown文档(见第3.4节)。
The online version of this book is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You can purchase a hardcopy from Chapman & Hall or Amazon.
这本书的在线版本是根据知识共享署名-非商业性- sharealike 4.0国际许可协议授权的。你可以从Chapman & Hall or Amazon购买纸质版。