技术写作与文档2016blog.rstudio.org编辑精选
Bookdown:用 R Markdown 编写书籍与技术文档
Bookdown – Authoring Books and Technical Documents with R Markdown
导读
这是 RStudio 发布 Bookdown 的公告:用 R Markdown 写书和技术文档,把计算、表格、图表嵌进正文,并输出网页、PDF 等多种版本。写作者值得读,是因为它示范了“内容与排版分离、一次写作多端输出”的工作流思路,而评论区还给出了一套可借鉴的长文档写作流程。
可以直接用的写作要点
- 01
把“组织内容、重排结构”和“生成排版成品”分成两步:先用擅长长文的工具写草稿,再交给构建工具输出成品。
- 02
参考文献统一交给文献管理工具(如 Zotero)并导出 bibtex,不要手工维护引文。
- 03
让数据、表格和图表直接嵌在源文档里随文更新,减少手工复制粘贴带来的错误与不一致。
- 04
用纯文本源文件(Markdown)承载内容,一次写作即可生成网页、PDF 等多个版本,避免为每种格式重排一遍。
HN 评论精选
长篇写作要分工:Scrivener 负责组织与重排结构,Zotero 负责文献,Bookdown 负责计算、图表与排版输出。
我非常喜欢 Bookdown,但前提是先把它嵌进自己的写作流程。我写的是一本约 150 页的专著,随着内容增长,在纯文本 Markdown 文件里(无论用 RStudio 还是别的编辑器)组织段落、调整结构越来越笨重,于是我把写作搬到 Scrivener——我用过的最好的长篇写作工具,强烈推荐。我在 Scrivener 里写 RMarkdown,再编译成纯文本;参考文献用 Zotero 管理并导出 bibtex;Bookdown 把这两份文件接过来,嵌入我的计算、表格和图,输出排版精美的成品。
hoodwink查看英文原文
I _love_ Bookdown, but only once I figured out how to incorporate it into my writing workflow. I'm writing a ~150 page monograph. As the document evolved, organizing the prose and reordering the structure gradually became too cumbersome in plain text Markdown files (whether I used R Studio or some other editor). So I shifted my writing over to Scrivener---the best long-form writing tool I've ever used, highly recommended. I write RMarkdown in Scrivener and compile the document into plain text. I manage my reference materials Zotero and export bibtex bibliography. Bookdown then takes the two files, incorporates all my calculations, tables, plots, and figures, and outputs a beautifully rendered document.
同类还值得读
编写更好文档的框架
A Framework for Writing Better Documentation
这是 Divio 的文档写作框架,把技术文档按「读者的目标」分成四类:教程(学习导向)、操作指南(问题导向)、参考(信息导向)、解释(理解导向)。
技术写作与文档2021 · 637 分 · 76 评4 条写作要点编辑精选写好一份设计文档
Writing a good design document
这篇 HN 帖子标题为《Writing a good design document》,主题是如何写好一份设计文档;对写作者来说,它值得作为技术写作和结构化说明文的参照。
技术写作与文档2025 · 581 分 · 147 评3 条写作要点编辑精选技术写作课程
Technical Writing Courses
这是 Google 官方免费技术写作课程(两门),讲受众定义、主动语态、短句、文档结构等基础方法。
技术写作与文档2020 · 571 分 · 73 评4 条写作要点编辑精选写出更好的错误信息
Write better error messages
这篇帖子讨论如何写出更好的错误信息,评论补充了开发者场景下的具体做法和真实反面案例。
技术写作与文档2022 · 566 分 · 253 评4 条写作要点编辑精选写一本技术书的经济账
The Economics of Writing a Technical Book
一位技术书作者拆解写书的真实经济账:版税收入往往远低于投入的时间成本。
技术写作与文档2018 · 519 分 · 149 评4 条写作要点编辑精选