HN 写作课

工程师们二十年里聊过的写作。

工程师、作家、编辑和创业者在 Hacker News 上聊了二十年“怎么写”:怎么写得清楚、怎么讲好一个故事、技术文档怎么写、小说和出版是怎么回事。这里把其中关于写作与讲故事的帖子挑出来,配上中文导读、可以直接用的写作要点和评论翻译。

从必读开始
  • 2,600+篇关于写作的 HN 讨论

Writing tips

写作锦囊

正在抽一条写作要点…

Essential

必读 30 篇

在讨论库里看全部精选

编辑精选里 HN 讨论最热的 30 篇,每篇都有中文导读和写作要点。

  1. 正在载入…

Archive

讨论库

按发帖年份分布,点柱子筛选。

排序

    About

    这些讨论是怎么挑出来的

    1. 01

      从全量里捞

      读取 Hacker News 自 2006 年以来的全部帖子,用关键词先捞出 40 分以上、可能和写作有关的约 1.1 万篇。

    2. 02

      只留真正讲写作的

      由 AI 逐条判断是否和写作、讲故事、文风、出版有实质关系,剔除“写代码”“编辑器”这类字面撞车,并分进十个类别。

    3. 03

      提炼可用的要点

      为值得读的帖子写中文导读,提炼 2-4 条可以直接用到自己写作里的要点,并精选翻译 HN 高赞评论。内容由 AI 生成,可能有误。

    写作方法2019joecmarshall.com

    用 Unix 写一本书

    Writing a Book with Unix

    阅读原文 HN 讨论
    132HN 得分
    78条评论
    4条写作要点

    导读

    这是一篇讲如何用 Unix 命令行工具搭建写书环境的实践文章:作者用纯文本、标记语言和脚本把写作、排版、输出串成一条可复用的流水线。对写作者的价值在于:它把“写书”从依赖 Word 的体力活,变成可版本控制、可批量转换格式的工程问题,尤其适合长篇、结构复杂的项目。评论区还补充了与出版社打交道的现实教训。

    关键词 写作工具链纯文本写作Markdown 与 LaTeX长篇写作结构

    可以直接用的写作要点

    1. 01

      用纯文本加标记语言(Markdown 为主,必要时嵌入 LaTeX)写作,方便版本管理、差异对比和后续格式转换。

    2. 02

      用 pandoc 配合 GNU Make 建一个标准 makefile,一条命令输出 PDF、HTML、Word 等多种格式,新增格式只需改几行配置。

    3. 03

      文件名不要带章节编号,改用 include 结构在总纲文件里定义章节顺序,这样调整结构时不用重命名文件。

    4. 04

      动笔前先确认出版社或合作方接受的文件格式,否则可能因为工具链不兼容而让项目告吹。

    HN 评论精选

    出版社的格式要求可能成为硬约束,工具选择要提前谈妥。

    我曾有一个图书项目告吹,原因是我拒绝安装 MS Office(我没有 Mac,也拒绝装 Windows),而对方不接受 Markdown 或 LaTeX,我又无法让他们的模板在 LibreOffice 里正常工作。最讽刺的是,这本书讲的是在 Linux 上用 Haskell 做网络服务器开发。

    tombert查看英文原文

    I will not name the company, but a book deal I was working on fell through because I refused to install MS Office (since I didn't have a Mac and I refused to install Windows), they refused to accept markdown or LaTeX, and I couldn't get their template working in LibreOffice. The part I find funny was that the book was about doing network server development with Haskell...on Linux.

    Markdown 打底、LaTeX 精修,用 pandoc+Make 统一输出,并用 include 结构而非文件名管理章节顺序。

    我从 1980 年代末就在 Linux/Unix 上写作,包括几部长篇书稿,用过 nroff、HTML、LaTeX、Markdown 等。LaTeX 看似吓人其实没那么难(有很好的入门书),不过多数场景 Markdown 就够用;我通常用 Markdown,需要时内嵌 LaTeX,或转成 LaTeX 继续编辑以获得更精细的控制。建议把 pandoc 和 GNU Make 加入工具箱:一个标准 makefile 就能输出从纯文本到 HTML、PDF、Word、MediaWiki 等各种格式,加一个新输出只是改改 makefile。一条组织建议:文件名不要带章节编号,让总纲文件用 include 结构定义正文顺序,这样需要重排结构时比预先给文件编号好管理得多。

    dredmorbius查看英文原文

    I've been writing on Linux/Unix systems since the late 1980s, including now a few book-length projects. Tools have varied over the years, including some uni work in nroff, HTML, and more recently, LaTeX and Markdown, among other markup languages. LaTeX strikes me as the ultimate tool, and far less intimidating than most people seem to think (Laport's book is an excellent intro), though for most purposes, Markdown is more than sufficient. In practice, I tend to use Markdown and either include inline LaTeX as needed, or convert to LaTeX and continue editing in that where finer-grained control is necessary. I'd add pandoc to the toolkit, as well as GNU Make. With the two, I've got a standard makefile that can output a wide range of formats (I refer to them as "endpoints") ranging from ASCII text to standalone or snippets of HTML, PDFs, PS, MS Word, OSX, Mediawiki, and others. Adding a new endpoint is a simple matter of tweaking the makefile. One piece of organisational advice: Do NOT apply your chapter numbers to your filenames. Instead, allow your principle document outline, using an include structure, to define the flow of the text. Depending on the project size and complexity, I'll either directly include chapters within that level, or have a top level of parts with chapters specified (as second-level includes) within those. As you decide you need to re-work flow, this becomes much easier to manage and rearrange than if you'd pre-labled the files themselves.

    Word 在复杂排版和长文档上不可靠,严肃写作应转向标记语言。

    幸好还有 LaTeX。任何严肃写作里,Microsoft Word 都是最糟糕的工具之一,一旦用到稍微高级一点的功能,它就开始暴露丑陋的一面。

    akandiah查看英文原文

    I'm glad there's always LaTeX. For any serious writing, Microsoft Word is one of the worst pieces of tools out there. It starts showing its ugly side when start using anything remotely advanced.

    同类工具还有 troff、asciidoc 等替代选择,可按需比较。

    我本来期待这篇文章用的是 troff 这类原初的 Unix 排版工具。另外有点意外,作者用了 Markdown 而没上 asciidoc。

    timClicks查看英文原文

    Was hoping that this would be using the original UNIX typesetting tools like troff. Also, surprised to see that asciidoc wasn't deployed over markdown.

    同类还值得读

    1. 被低估的工程技能:把文章写好

      Undervalued Engineering Skills: Writing Well

      这篇文章讨论为什么“写得好”是被低估的工程能力,以及它如何在团队协作、系统设计和职业发展中持续带来回报。

      写作方法2019 · 1,109 分 · 371 评4 条写作要点编辑精选
    2. 每行只写一句话:让写作和修改都更轻松的排版法

      Writing one sentence per line

      这是 Derek Sivers 的一篇短文,主张写作时每行只放一个句子,而不是按段落排版。

      写作方法2022 · 849 分 · 297 评4 条写作要点编辑精选
    3. 书面沟通是远程工作的超级能力

      Written communication is remote work super power

      这篇文章讨论远程工作中书面沟通的价值,评论区则补充了异步与同步沟通的适用场景,并提醒读者:备忘录、结论先行、结构化命令格式等书面沟通传统早已有之。

      写作方法2020 · 831 分 · 190 评4 条写作要点编辑精选
    4. 如何写出有用的文字

      How to Write Usefully

      保罗·格雷厄姆在这篇文章里给"有用的写作"下了一个可操作的公式:有用≈重要×新颖×正确×清楚,任一项为零,整篇文章就等于零;他还主张敢下确定判断、删掉让自己心虚的句子。

      写作方法2020 · 821 分 · 285 评4 条写作要点编辑精选
    5. 如何写得更清楚、想得更清楚,并学会复杂材料(PDF)

      How to write more clearly, think more clearly, and learn complex material [pdf]

      这份 PDF 讨论如何把文章写清楚、把思路理清楚,并用写作来学习复杂材料。

      写作方法2022 · 779 分 · 153 评4 条写作要点编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。