工具与资源thorstenball.com
我写书所用的工具
The Tools I Use to Write Books
2018 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
Thorsten Ball 在这篇博文里分享自己写书时使用的工具和流程,但核心结论是:不要让折腾工具和格式拖延真正的写作。他提到自己最终写了两本书、零个自造工具,并把这视为成功;评论区则补充了 LaTeX+pandoc、Sublime Text+单文件笔记、Leanpub 等不同工作流。
为什么经久不衰:它戳中了技术人容易用“搭工具”逃避写作的毛病,提醒完成作品比工具选择更重要,因此多年后仍值得读。
HN 评论精选
不要把时间花在造工具上,完成书才是成功。
对我来说最重要的引文是:“阻止我[写自己的工具]的,是脑海里一个平静的声音,它告诉我:我在这里是写书,不是写预处理器。[...] 现在我已经写了两本书、零个工具,我认为这是成功。”
akavel查看英文原文
The most important quote here for me: "What kept me from [writing my own tool] was a calm voice in my head telling me that I’m here to write a book, not a preprocessor. [...] Now I have written two books and zero tools, which I consider a success."
LaTeX+pandoc 条件编译可同时产出印刷 PDF 和电子书。
我为自己需求定了类似方案,很满意:书全用 LaTeX 写,每章一个文件,主文档合并,可完全控制排版并直接生成印刷级 PDF;再用 pandoc 转 ePub,并用条件命令让同一标记在印刷版和电子书里输出不同格式;最后解包 ePub 调整 html/css,用 kindlegen 校验,得到可上传的 epub/mobi。这个流程好到我下一本书还会用。
grecy查看英文原文
I settled on something similar for my needs, and I'm really happy with it. 1. Book is entirely written in LaTeX, every chapter in it's own file, master doc with everything combined. I really like having different gutters for left and right pages, ultimate control over formatting, fancy things like Lettrine, header layout and design etc. When I want to do something across the entire doc I write a new command and can use it anywhere. I Create perfectly formatted print-ready pdf to go to printers directly from this. 2. Run LaTeX file through pandoc to create an ePub. A little known trick that is now supported by pandoc is conditionals in the LaTeX doc, so when formatting gets hairy I declare commands like this in the master LaTeX document: \iftoggle{ebook}{ \newcommand{\textbreak}{\newline\hrule\newline} }{ \newcommand{\textbreak}{\begin{center}\LARGE{$\Psi\quad\Psi\quad\Psi$}\end{center}} } So I can use \textbreak{} anywhere I want, and I know it will be formatted perfectly in both output formats. 3. Un-pack the ePub and tune some of the html/css to my personal taste, then pack it back together. I run it through kindlegen to make sure it's valid, and I have an epub/mobi ready to upload to stores. I like this workflow so much I'm using it again for my next book
单文件笔记加简单编辑器,保持简单、专注写作。
我正在写科幻小说,进展比以往任何尝试都远。我用 Sublime Text,有时开无干扰模式,但通常不开,因为常要 Google 科学内容。我有一个 story.txt,放主角姓名、年龄、外貌、详细历史时间线,以及动笔前写的章节大纲。章节编号后来大变,但整体大纲仍忠于最初想法。我喜欢这个系统:保持简单,专注写作!
davedx查看英文原文
I'm writing a sci-fi book at the moment. Somehow I've come much further than any of my other book writing attempts, including one that I actually (self)-published. I use Sublime Text, sometimes in distraction free mode, but usually not because I often want to Google sciencey things. I have a single file called "story.txt" that has all the important notes - the names, ages and visual descriptions of the main characters, a detailed (historical) timeline, and chapter outlines I wrote before I started when I knew roughly what the overall plot was going to be. The chapter numbering has changed drastically but the overall outline has stayed pretty true to the original idea. I really like this system. Keep it simple and focus on writing!
工具不是障碍,缺的是坐下来写的动力;格式问题可后修。
我写过 4 本技术书,同意 Thorsten 结尾说的:这些工具其实不重要,或最多是边际因素。多数说想写书的人缺的是动力,不是工具。我用过 Word 模板、asciidoc、markdown 转 asciidoc,格式问题很多,后来还是回到 Word 模板。现在想尝试自出版,喜欢 Leanpub 的类 markdown 格式。但再说一次,这些都不重要,格式可以后修,你必须坐下来写!
WoodenChair查看英文原文
I've written 4 technical books including the Classic Computer Science Problems Series (https://classicproblems.com). I agree with what Thorsten said at the end—none of this really matters—or it's marginal at most. Most people who say they want to write a book lack the motivation to do it. It's not the tools getting in the way. Apress used Word templates back in 2013 when I did my first book with them. Manning let you use asciidoc or Word templates when I worked with them. I wrote my first book with them in markdown and translated to asciidoc using pandoc. There were so many formatting issues and I found the tools for asciidoc so immature that I ultimately went to using their Word templates on my next two books with them despite preferring purely text formats. Now I'm working on my next book and I think I'm going to try self publishing. I'm liking leanpub's use of a markdown like format. But again none of this really matters. You can fix formatting later. You have to sit down and write! PS Thorsten's "Writing an Interpreter in Go" is great: https://amzn.to/3yLTJjE
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com