写作方法2019github.com
用 Org Mode 写博士论文
Writing a Ph.D. thesis with Org Mode
导读
这是 Hacker News 上围绕「用 Emacs Org Mode 写博士论文」的讨论(原帖是一个 Org Mode 论文模板仓库)。评论者分成两派:一派推崇 Org Mode 的纯文本与版本控制、树状结构编辑和自动化流水线,另一派认为 LaTeX 原生的排版控制力仍不可替代。对要写长篇复杂文档的写作者来说,这场争论实际上在讨论一个核心问题:写作工具应如何服务于结构组织、文献管理和重复劳动的自动化。
可以直接用的写作要点
- 01
用纯文本并使用 git 等版本控制管理长篇稿,格式不会因软件更迭而失效,每次改动都可回溯。
- 02
优先选支持结构化编辑的工具:能随手新建、移动、升降章节节点,先把思路的骨架摆对,再打磨句子。
- 03
把引用管理、图表生成、导出 PDF 这类重复劳动自动化(如提交即自动构建),把注意力留给内容本身。
- 04
评估新工具要看净收益:若文稿主体已是 LaTeX 论文拼合而成,引入新工具只增加复杂度就不值得。
HN 评论精选
纯文本 + 提交钩子自动构建 + org-ref 文献管理,把整条写作流水线自动化,一次投入换长期省心。
我把论文写成一个放在 git 里的 org 文件,每次 commit 时通过 commit hook 里的 bash 脚本自动发布成 PDF。图表可以由实时数据计算生成,org-ref 能边写边自动管理和格式化全部参考文献,免去通常那些让人抓狂的流程。另一个妙处是:我可以写一段代码调用远程 API(比如 Google Docs),把导师习惯使用的协作编辑稿里的整章内容抓取下来并排好版,按 C-c C-c 就嵌入文档——非常适合把各种来源的论文缝合到一起。学习曲线是陡,但经历过多年痛苦的写作与出版流程后,能有一个统一工具调用我需要的任何工具,实在让人安心。如果你今天开始读博、且工作中会用到代码,我强烈建议学 org-mode。
tgbugs查看英文原文
I have been writing my thesis as an org-mode file in git that is automatically published [0] as a pdf every time I commit using a bash script tangled as a commit hook. Figures are (or can be) computed from live data, and org-ref can automatically manage and format all my references as I go without the insanity inducing workflows that one usually has to resort to. Another amazing thing about org-mode is that I can write a code block to hit a remote api (e.g. google docs) and fill and format entire chapters from a collaborative editing source that my advisor is comfortable using, C-c C-c and it is embedded in the document. Perfect for stitching papers together from a variety of sources. While there is a learning curve, the peace of mind of having a single tool that enables me to use any tool I need to use was such a relief after years of other painful writing and publishing workflows. If you are starting a PhD today and are going to do anything at all with code, I seriously suggest you learn org-mode. By the time you finish, not only will you have a PhD, but even if you don't you will have the power of one of the most amazing authoring tools under your command! (I would say, "Learn org-mode, simplify your life!" but emacs tends to lead to other complications). 0. https://orgmode.org/manual/Publishing.html
论排版控制的极限,LaTeX 原生仍胜过 Org 的转译,特殊表格与版面需求是关键差异。
技术上做得到,但感觉不是合适的工具。Org mode 只能转换成基础 LaTeX,浪费了 TeX 的强大能力。我整篇论文都用 LaTeX 写,过程像坐过山车:总会有某个特别的表格、图、版面安排或额外间距需求,只能用「真家伙」编程实现。用 org mode 做同样的事会是噩梦。我只遗憾一件事——不能在 LaTeX 表格里像 Excel 那样就地计算填列和求和,但这不该怪 TeX,R+LaTeX 的组合把这块补上了。除此之外,TeX 生态几乎预见了写博士论文时你能想到的一切需求,从最基础到极冷门的都有。
pvaldes查看英文原文
Could be be done, but does not feel like the appropriate tool. Org mode translates to a basic latex only, that is a huge waste of TeX power. I did my thesis entirely in LaTeX, so I have some experience in the theme, and it was a rollercoaster. There is always some really special table, graph, arrangement, extra space needs, that you can do only programming with the real stuff. Doing the same with org mode would have been stuff of nightmares (even if org tex has some nice qualities that LaTex does not have, like fast shrinkable text). I missed only a thing. Being able to do in situ calculus in LaTeX (filling columns and totals in tables excel style), but is not really the right tool for that so you can't blame TeX for that. The team of R+Latex filled the gape nicely. Apart of this, TeX environment has planned and build yet anything that you could dream when you write a PHD thesis. From basic, to really esotheric. Can be difficult sometimes, but is awesome.
高效的结构化(树状)编辑是长篇写作的关键能力,纯文本、版本控制与便捷导出可以兼得。
2000 年代末我挑论文写作工具时,很快排除了 Word、LibreOffice Writer 这类所见即所得软件,因为:1)缺少在结构(树)层面快速操作文档的方法,而章节一多,这对组织思路和论证很重要;2)数学公式支持差;3)与我当时用的文献管理工具 Mendeley 集成不好。作为 Emacs 用户,我发现了 Org,它当时是、现在仍是完美工具:纯文本永不过时,容易配合 git 或版本控制。无论当时还是现在,Org 的速度和灵活性都无可匹敌——结构化编辑(新建节点、移动节点、提升/降低层级)是 Org 的核心能力(Markdown 等没有),边想边写、随时重排思路和文字都极其容易。可以导出 LaTeX 或 HTML 并按需定制格式,同时内嵌多语言代码块;与 BibTeX 集成紧密,管理几百条参考文献很轻松。别的工具让我面对复杂文档皱眉骂人,Org 让写作变成纯粹的享受。
limist查看英文原文
Back in the late 2000's I looked around for the right tool for my Ph.D. dissertation and quickly ruled out Word, Libre (or Open Office) Writer, or any wysiwyg tool, because they 1) lacked fast, easy ways to work at the structural (tree) level of the document, which is important when you have many sections and subsections to organize thoughts and arguments; 2) couldn't do mathematical notation well; 3) didn't integrate well with the reference management tool I was using then, Mendeley. As an Emacs lover, I soon found Org, and it was (and remains) the perfect tool, for working in plain text — which will never be obsolete, and works easily with git or version control. Then and now, nothing could match Org speed and flexibility: structural editing (creating nodes, moving nodes, promote/out-dent a node, demote/in-dent a node) was and is fundamental to Org (unlike Markdown etc), and it's ridiculously easy to reorganize thinking and writing as you go. You can export to LaTeX (or HTML) and customize formatting as needed, while also including code blocks from multiple languages. Integration with BibTeX was tight, and made handling hundreds of references easy. Where other writing tools for complex documents previously made me cringe and cuss, Org makes writing a pure joy, freeing the mind to work entirely on content and its structure.
若论文主体本就是 LaTeX 论文的拼合,引入新工具只增加摩擦,收益为零。
我不确定其他领域如何,但如今计算机科学的大多数论文,基本是把已发表的论文缝合起来再加点过渡文字和背景介绍。也就是说,论文的 80% 已经是 LaTeX 格式了,用 Org Mode 只会给工作流增加复杂度,不会减少复杂度。
m000查看英文原文
I'm not sure about other fields, but most theses in computer science these days are usually a stitch-up of your papers + some glue text/backstory. I.e. 80% of your thesis is already in LaTeX format. Org Mode only adds complexity to your workflow.
同类还值得读
被低估的工程技能:把文章写好
Undervalued Engineering Skills: Writing Well
这篇文章讨论为什么“写得好”是被低估的工程能力,以及它如何在团队协作、系统设计和职业发展中持续带来回报。
写作方法2019 · 1,109 分 · 371 评4 条写作要点编辑精选每行只写一句话:让写作和修改都更轻松的排版法
Writing one sentence per line
这是 Derek Sivers 的一篇短文,主张写作时每行只放一个句子,而不是按段落排版。
写作方法2022 · 849 分 · 297 评4 条写作要点编辑精选书面沟通是远程工作的超级能力
Written communication is remote work super power
这篇文章讨论远程工作中书面沟通的价值,评论区则补充了异步与同步沟通的适用场景,并提醒读者:备忘录、结论先行、结构化命令格式等书面沟通传统早已有之。
写作方法2020 · 831 分 · 190 评4 条写作要点编辑精选如何写出有用的文字
How to Write Usefully
保罗·格雷厄姆在这篇文章里给"有用的写作"下了一个可操作的公式:有用≈重要×新颖×正确×清楚,任一项为零,整篇文章就等于零;他还主张敢下确定判断、删掉让自己心虚的句子。
写作方法2020 · 821 分 · 285 评4 条写作要点编辑精选如何写得更清楚、想得更清楚,并学会复杂材料(PDF)
How to write more clearly, think more clearly, and learn complex material [pdf]
这份 PDF 讨论如何把文章写清楚、把思路理清楚,并用写作来学习复杂材料。
写作方法2022 · 779 分 · 153 评4 条写作要点编辑精选