I discovered this post in my drafts when I came here to post about changing my method again. I’m going to publish this for history’s sake, but as of the day I hit publish on this post I’m switching again, this time to using LaTeX.
I finally found a method for generating PDFs that fits my skillset: PrinceXML. This is a program that takes in HTML files and CSS and generates PDFs from it.
As I’ve discussed in previous posts, my workflow has me saving parts of my text for Binding World as individual files. I have one file for a magic item, and one file for a monster, and one file for the dungeon starter that contains both. That data is all compiled into JSON, then my page templates take in that JSON data to generate the final XML.
I used to be importing this XML into InDesign, and working on styling by mapping tags to styles. This seemed to work okay, but as I’m a web developer by trade I’m much more comfortable styling with CSS.
My new workflow has done two things. First, I’ve tweaked the XML generating step to include links to CSS files that PrinceXML uses to style the final product. Second, I’ve added some simple scripts to actually run the Prince compiler.
My new flow has me changing a file like stained_glass_dagger.md, which triggers a recompile of my game data into JSON, which recompiles my pages with that data into XML, which triggers Prince to compile those into PDF files.