出版与作家生涯2019richardmavis.info
用网页技术印一本书
Using Web Technologies to Print a Book
导读
作者用网页技术(Markdown、HTML/CSS、wkhtmltopdf 之类)把书稿自动排版并印成实体书,把写作者从手工排版中解放出来。对写作者的价值在于:它示范了如何让“内容”和“呈现”分离,一次写作就能输出纸书、电子书等多种成品,同时提醒你排版质量仍有专业门槛。
可以直接用的写作要点
- 01
把正文写成纯 Markdown/HTML 等结构化文本,让版式由模板和工具生成,改内容时不必碰格式。
- 02
一次写作,多路输出:同一份书稿通过不同“编译”配置生成精装、平装、mobi、epub,避免为每种载体重排一遍。
- 03
先用现成工具(Scrivener 的 Compile、PressBooks 模板等)把成品做出来,只有在工具确实做不到时才自己写脚本。
- 04
印刷级排版要看断行算法:浏览器式的贪心断行容易产生空白“河流”和孤行,纸书排版仍需更专业的引擎把关。
- 05
建立可版本管理的工作流(如 git 分支合并),长项目的改稿和试验都更安全。
HN 评论精选
先评估 GitBook、PressBooks、Scrivener 这类现成工具,它们同样基于网页技术但更省手工。
GitBook 和 PressBooks 也是便宜又好用的选择,两者都用网页技术构建,而且比手工流程省事。GitBook 面向用 Markdown 写技术文档的人,好处是集成 git,可以靠分支和合并推进一本书的项目;它的 GitHub 账号仍托管着旧版开源编辑器和命令行工具,不过项目重心已转向商业化的网页编辑器。PressBooks 面向想自出版的人,提供按书籍类型设计的模板,还有在亚马逊售卖纸质书的流程。另一位评论者提到的 Scrivener 则是写作工具,支持剧本、小说等多种稿件格式,并有整理笔记、想法和参考资料的功能。
mch82查看英文原文
GitBook PressBooks are also very affordable and great options that are built with web technologies and are slightly less manual. https://www.gitbook.com/ https://pressbooks.com/ GitBook is targeted at people creating technical documentation in Markdown. It has the advantage of git integration so it’s possible to branch & merge your way through a book project. Their GitHub account still hosts the legacy open source editor and cli tools, although the project has moved on to focus on the commercial web-based editor. https://github.com/GitbookIO?tab=repositories PressBooks is targeted at authors who want to self-publish and has a nice set of book templates (styled by book genre) and a workflow for selling print books on Amazon. Scrivener (mentioned by dangoor in another comment) is a writing tool with advanced features for different manuscript formats (screen plays, novels, etc) and has cool features for organizing notes, ideas, and references.
不必为了自动化而自动化——成熟的写作工具足以直接产出印刷版和多种电子书。
这方案在 Linux 上不行,但对写小说的人,我很推荐 Scrivener(Mac 和 Windows 都有)。除了强大的写作环境,它的“Compile”功能能灵活输出印刷版和电子书:我生成过精装、平装、mobi 和 epub,可自定义程度够我用,而且完全不用写脚本。当然这里是 Hacker News,大家(包括我)都喜欢写代码,但有时你只是想用工具把东西做出来而已。
dangoor查看英文原文
This doesn't work for Linux, but for folks writing a novel, I can definitely recommend Scrivener (Mac and Windows). In addition to a powerful writing environment, it's "Compile" feature can output flexibly for print and ebooks. I generated hardcover, paperback, mobi, and epub, with enough customizability for me and no scripting required. Granted this is Hacker News and people here _like_ writing code (myself included), but sometimes you just want to use a tool to make a thing :)
浏览器排版在印刷质量上仍有差距:贪心断行会造成空白河流和孤行,纸书排版宜用 TeX 级工具。
HTML 和 CSS 的渲染引擎实现了 Knuth 的段落排版算法了吗?据我所知它们仍在用贪心的断行与两端对齐,会产生各种瑕疵,比如空白“河流”和孤行,而 TeX 的 Knuth 式断行能避免这些问题。目前做印刷品,我仍然只会考虑 TeX 或某些重量级的桌面排版软件。
quotemstr查看英文原文
Do HTML and CSS rendering engines implement Knuth paragraph layout yet? AIUI, they still use greedy line layout and justification, which can produce various artifacts (like whitespace rivers and orphan lines) that the Knuth-style linebreaking in TeX avoids. Right now, I still don't think I'd consider using anything but TeX or some heavyweight DTP package for printed material.
同类还值得读
写书:值得吗?
Writing a book: is it worth it?
Martin Kleppmann(《设计数据密集型应用》作者)复盘写书到底值不值:金钱回报低、耗时极长,但带来了可见度、信任和职业机会。
出版与作家生涯2020 · 642 分 · 287 评4 条写作要点编辑精选写书并不是个好主意
Writing books is not really a good idea
这篇文章讨论靠写书谋生的现实难度,评论区从版税数学、收入预期和写作目标三个角度补充了作者视角。
出版与作家生涯2021 · 577 分 · 609 评4 条写作要点编辑精选如何自助出版一本书:实用资源清单
How to self-publish a book: A handy list of resources
这是一份关于「如何自助出版一本书」的资源清单帖,涵盖从编辑、排版到 ISBN、销售渠道的实操工具与花费。
出版与作家生涯2018 · 558 分 · 88 评4 条写作要点编辑精选我自助出版一本Ruby on Rails书,赚了7万美元
How I Made $70k Self-Publishing a Book about Ruby on Rails
这是一篇 Ruby 开发者自述:他把一套 Rails 性能课程(书+视频+答疑)自出版,一年毛收入约 7 万美元,并总结了选题、定价、营销等经验。
出版与作家生涯2017 · 539 分 · 175 评4 条写作要点编辑精选石黑一雄警告年轻作家因“恐惧”而自我审查
Sir Kazuo Ishiguro warns of young authors self-censoring out of 'fear'
石黑一雄提醒年轻作者因“恐惧”而自我审查,即这条帖子讨论的核心。
出版与作家生涯2021 · 396 分 · 641 评5 条写作要点编辑精选