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 生成,可能有误。

    技术写作与文档2021jarbus.net

    如何不写 LaTeX 也能写出 LaTeX

    How to write LaTeX without writing LaTeX

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

    导读

    这篇文章介绍如何用 Markdown、Pandoc 等工具间接生成 LaTeX 文档,从而不必手写 LaTeX 语法,适合需要排版论文或技术文档、又不想被格式折腾的写作者。评论区讨论了各种替代方案的取舍:Markdown 的便利与局限、直接学 LaTeX 的成本,以及 LyX 这类折中工具。

    关键词 MarkdownLaTeXPandoc写作工具

    可以直接用的写作要点

    1. 01

      先用 Markdown 完成初稿;等你感到语法限制、开始跟工具较劲时,再升级到 LaTeX,不要在前期纠结格式。

    2. 02

      需要多格式输出(HTML、EPUB、PDF)时用 Pandoc;只输出 LaTeX 且要符合学术模板时,考虑 markdown 宏包,它能生成符合预期的 biblatex 引用。

    3. 03

      把 Markdown 当作起点,不算放弃 LaTeX:可以先用 Pandoc 生成 LaTeX 源文件,再手动调整复杂排版,兼顾低摩擦写作与精细控制。

    4. 04

      写作工具的选择应以降低写作摩擦为标准:格式越少介入越好,把注意力留给内容本身。

    HN 评论精选

    只用 LaTeX 输出时,markdown 宏包比 Pandoc 更贴合学术模板的引用习惯。

    如果你的输出只是 LaTeX,推荐 markdown 宏包(用 Lua 解析并转换 Markdown)。Pandoc 的优势在于能同时输出 EPUB、HTML、LaTeX/PDF 等多种格式;但在只输出 LaTeX、尤其是学术写作场景下,markdown 宏包会把内容转成你预期的 LaTeX。例如引用会转成 biblatex 调用,而 Pandoc 会自己生成全部引用和参考文献,绕过你和导师习惯的样式与行为。

    dindresto查看英文原文

    If your only target from Markdown is LaTeX, I recommend the LaTeX markdown package which uses lua to parse and convert the input markdown: https://github.com/Witiko/markdown Pandoc shines when targetting multiple backends, like EPUB, HTML and LaTeX/PDF. But the LaTeX markdown package has one advantage when only targetting LaTeX, especially in academic settings: it translates everything to the LaTeX you'd expected. For example, citations are translated into biblatex calls, while pandoc generates all of the citations and the bibliography by itself, bypassing the style and behavior you and your professors might expect.

    需求简单时,直接学基础 LaTeX 比搭工具链更省事。

    花 20 分钟学一下 LaTeX 就够了。只要你的排版需求不比 Markdown 能做的更复杂,这点时间足够。

    togaen查看英文原文

    Just spend 20 minutes learning LaTeX. If you’re already not doing anything more complicated than what you can do with markdown, that’s all the longer it will take.

    Markdown 起草、Pandoc 转 LaTeX 再精修,是兼顾效率与控制力的实用流程。

    我同时喜欢 Pandoc 和 LaTeX。大量文本准备工作只用标准 Markdown 就能完成,那就用 Markdown。但 Markdown 有局限:当你开始跟它较劲时,就该考虑下一步了。LaTeX 本身出乎意料地好写,尤其写简单文档时。用 Markdown 起步来搭建 LaTeX 文档也是好选择:Markdown 写起来阻力略小,我起草或复制素材时会用它;如果需要更复杂的格式,就用 Pandoc 生成第一版 LaTeX 源码,再进去添加元素或调整复杂段落。

    dredmorbius查看英文原文

    I'm a fan of both Pandoc and LaTeX. There's a pretty incredible amount of text preparation which can be done only in bog-standard Markdown, and if that's the case, go for it. Markdown has its limitations, and if you find yourself starting to fight it ... consider that it's probably time to take the next step. LaTeX itself is surprisingly easy to write, again most especially if you're writing simple documents. And using Markdown to bootstrap creating a LaTeX document is also a good option. I find Markdown slightly lower-friction to write, and will use it when either composing or copying works initially. If they do require more complex formatting, I'll generate the first iteration of the LaTeX source with Pandoc, then dive into that and add additional elements or tweak complex sections as needed.

    LyX 提供图形界面的折中方案,但牺牲了一定的排版精确控制。

    另一个常被忽略的替代品是 LyX:它是以 LaTeX 为内核的所见即所得编辑器。不过和其他所见即所得或混合系统一样,它在精确的格式控制上有所欠缺……

    srvmshr查看英文原文

    Another alternative often missed is LyX. It is a WYSWYM editor with LaTeX in the core. As with other WYSWYM or hybrid systems, it lacks the precise formatting

    同类还值得读

    1. 编写更好文档的框架

      A Framework for Writing Better Documentation

      这是 Divio 的文档写作框架,把技术文档按「读者的目标」分成四类:教程(学习导向)、操作指南(问题导向)、参考(信息导向)、解释(理解导向)。

      技术写作与文档2021 · 637 分 · 76 评4 条写作要点编辑精选
    2. 写好一份设计文档

      Writing a good design document

      这篇 HN 帖子标题为《Writing a good design document》,主题是如何写好一份设计文档;对写作者来说,它值得作为技术写作和结构化说明文的参照。

      技术写作与文档2025 · 581 分 · 147 评3 条写作要点编辑精选
    3. 技术写作课程

      Technical Writing Courses

      这是 Google 官方免费技术写作课程(两门),讲受众定义、主动语态、短句、文档结构等基础方法。

      技术写作与文档2020 · 571 分 · 73 评4 条写作要点编辑精选
    4. 写出更好的错误信息

      Write better error messages

      这篇帖子讨论如何写出更好的错误信息,评论补充了开发者场景下的具体做法和真实反面案例。

      技术写作与文档2022 · 566 分 · 253 评4 条写作要点编辑精选
    5. 写一本技术书的经济账

      The Economics of Writing a Technical Book

      一位技术书作者拆解写书的真实经济账:版税收入往往远低于投入的时间成本。

      技术写作与文档2018 · 519 分 · 149 评4 条写作要点编辑精选

    打赏支持

    打赏二维码

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

    WeChat

    关注向阳乔木

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

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

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