I don’t mean, really, how I come up with this stuff. I mean, how do I get it from my brain into a PDF.
First, let me say, I’m a programmer, a coder by training. If there’s any character in the book who is a self-insert, at least in terms of mental models, it’s Liz. So this book is written using the tools of a programmer, or a technical writer.
The book is a series of Markdown files, one per chapter.
Because Markdown is just text, I have a lot of advantages over if it was something else:
- I can edit them with any editor, on any OS - notepad, vi, nano, edit? all good!
- Usually, though, it’s Obsidian. What you’re reading right now, was written in Obsidian.
- All the normal Unix commands like cat, grep, less, wc, diff, all work on the files.
- I easily can track all of the changes across all chapters using Git.
- Conversion to the published formats PDF and EPUB is done with Pandoc.
The commands to produce the final files are something (not exactly) like this:
pandoc -f markdown+smart chapters/*.md -o manuscript.md -d defaults.yaml -M "title=A Tale of Woe"
pandoc -f markdown+smart chapters/*.md -o manuscript.epub -d defaults.yaml -M "title=A Tale of Woe"
Because Pandoc’s PDF conversion uses LaTeX, which defaults to the classic Computer Modern font, the PDF naturally has the look and feel of a Computer Science textbook or an article from a Mathematics journal. These defaults are easily changeable but I’m not touching it, because that’s how Liz would like it.