一位匿名博主近日发布文章,详细记录了其利用groff排版系统撰写并排版两部个人中篇小说的完整流程 1。这两部作品体量差异显著:第一部篇幅约50页(约1.5万字),创作耗时7个月;而第二部篇幅扩大至约120页(约4万字),却仅用10天便完成 1。尽管篇幅增加,但基于groff/troff的工具链在性能上表现优异,生成上述两份文档分别仅需约700毫秒和1.6秒 1。
为了实现高质量的纯文本排版,作者构建了一套包含.SH(章节标题)、.PP(悬挂缩进段落)和.LP(长段落)三个基本宏的自定义宏包 1。在写作环境配置上,作者采用硬换行策略,即手动控制每句或每段的换行位置,以便于Git版本管理及阅读导航 1。此外,通过Vim插件goyo.vim实现了全屏无干扰写作界面,并使用UW ttyp0 11x22变体字体 1。针对内容转换,作者编写了Perl脚本,将简化的Markdown格式转化为groff格式,过程中自动处理引号替换(Guillemets)及段落标记 1。
作者明确表示不发布这些作品,也未借助大型语言模型(LLM)辅助创作,而是强调沉浸于个人写作体验中的心理状态与修改过程 1。这一案例展示了在纯文本环境中进行专业级文学排版与创作的可行性及技术乐趣 1。
An anonymous blogger shared the technical workflow and personal experience behind writing two novellas using the groff typesetting system, emphasizing the viability and enjoyment of achieving high-quality layout in a plain-text environment 1. The first project, spanning approximately 50 pages or 15,000 words, required seven months to complete, while the second, a more extensive work of about 120 pages and 40,000 words, was finished in just ten days 1. The author explicitly stated that they do not publish their works and refrain from using large language models for assistance, prioritizing a deeply immersive personal creative process 1.
The technical setup relied on custom macros within groff/troff, including basic commands for section titles (.SH), hanging indented paragraphs (.PP), and long paragraphs (.LP) 1. This system proved highly efficient, generating the 50-page document in roughly 700 milliseconds and the 120-page manuscript in 1.6 seconds 1. To bridge the gap between modern drafting habits and legacy typesetting, the writer employed Perl scripts to convert simplified Markdown into groff format, automatically handling tasks such as replacing standard quotes with Guillemets and managing paragraph markers 1.
For the actual writing phase, the author utilized Vim with the goyo.vim plugin to create a distraction-free full-screen interface, employing a specific variant of the UW ttyp0 font at 11x22 dimensions 1. The text was managed using hard-wrapped lines, where each sentence or paragraph break was manually controlled to facilitate easier navigation and Git version control 1. Despite these structured tools, the post also touched upon the psychological aspects of writing and the difficulties encountered during the revision stages 1.
评论
还没有评论,欢迎留下第一条。