Hacker News new | ask | show | jobs
by tmoertel 31 days ago
I think it’s fascinating to see all the different ways that techfolk who write fiction set up their writing pipelines. Some people go with a bare-bones coding editor like Vim; others use “pro” tools Scrivener. And then there’s the typesetting pipeline. Using troff is pretty out there.

When I started writing fiction, here’s what I came up with. I write in Google Docs because it’s lightweight, works everywhere, and can easily export to Markdown format. From there, I manage the Markdown source in Git and Emacs. For typesetting—I cannot abide crappy word-processor output—I used to use Pandoc to generate LaTeX markup and run LuaLaTeX to produce PDFs. But that took several seconds. Now, I use Typst to go straight from Markdown to PDF files. It’s pretty much instant.

If you want to see what the output looks like, here’s the first chapter of my current project:

https://drive.google.com/file/d/1Wl4k_rdYGFZp-r5nq864r5CNzD1...

(Notice: This is a typesetting sample, not a writing sample. It’s my W40k-adjacent fanfic, so you have been warned.)

It’s set in 12pt Erewhon, which is an enhanced version of Andrey V. Panov’s Heuristica font family, which extends Robert Slimbach’s Utopia font family. Slimbach is a sublime type designer—he created Minion—and Utopia is one of his early works that is especially spirited.

5 comments

> techfolk who write fiction set up their writing pipelines

And perhaps infinitely procrastinating on the actual writing itself...

Indeed. One irresistible temptation for coders who go into writing is to bikeshed their pipeline. I know I have spent many hours tweaking my writing pipeline when I should have been writing. I mean, why just write when you can create a Containerfile to build a hermetically sealed image that houses your typesetting system and a dozen carefully chosen fonts, and then you can write scripts managed by a Makefile to launch containers from the image and inject into them your source text and extract from them the typeset PDFs? I mean, surely all of that is essential work on the critical path to getting your writing done. Right?
I remember a quote by Pandoc creator slash professor of philosophy John MacFarlane: "I would like to think that the time I’ve spent developing tools to make writing more efficient has been repaid by the time I’ve saved using these tools, but I’m pretty sure it hasn’t."

Reference: https://usesthis.com/interviews/john.macfarlane/

One writer recently wrote his own program for the job, but at least he eventually finished some books: https://hughhowey.com/neo/

Me, I just write in Emacs, set up a makefile, and export to PDF with Pandoc. But I admire the work to make a comfortable yet undistracting writing environment.

He just vibe coded it.
Well, that's kind of a good use of vibe coding. Let the clanker make the app and you focus on the art itself, the writing.
Not always:

https://t3x.org has two novels and tons of comp sci books probably made with very little...

Agreed, it seems writers that also code have all kinds of different workflows. I end up using (x)html and doing print stylesheets and rendering pdf for print using weasyprint (works really well, and they have sample stylesheets on their website that are a good starting point).

I like Erewhon. Nice font.

troff is no longer fashionable, and it's not what you want for top-quality typesetting, but I don't think of it as "out there". My non-technical mother was using an HDOS program called TEXT.ABS, which is similar to a limited nroff, to format the articles she wrote in the 01980s. It wasn't as easy to use as something like MacWrite, but it was a lot easier than a typewriter. The text editor she used was called PIE.ABS, and from my point of view, the usability distance from a typewriter to PIE was bigger than from PIE to MacWrite.

She didn't have much choice of fonts on the pre-Graftrax Epson MX-80 she used. I think it was Pica or Elite.

Typesetting is certainly very satisfying, but it's not essential to writing.

Huh. I wrote into vim and made a bunch of .md files, and then just had Claude assemble them into an epub to make my book for Kindle. How did you decide on that size of page for the PDF?
That PDF is for proofreading and review, so I just used U.S. Letter size to make it easy to print on my home printer. For actual publication, I would use the page size for, say, a trade paperback.

For epubs, right now I'm using Pandoc: https://pandoc.org/epub.html. But, again, that's just now for the writing and proofing stages. For final output, I'll consider my options. (I may still go with Pandoc, but right now I'm using it because I was already using it for typesetting and so it was a low-friction choice.)

I still use a custom markup language I made for myself [0] because I don't find Markdown flexible enough, Latex's syntax is disgusting, and neither is particularly consistent.

[0] https://breuleux.github.io/quaint/