"640 Pages in 15 Months"

Hilariously overwrought adventures typesetting a textbook. How about some LaTeX?

I kid. The system seems to work, looks fast, and the results are visually fantastic, so more power to them.

The stuff on metrics is gold:

Oh, and since I ended up writing a 200k+ word book, it’s going to have a high page count. That means a thick book. Thick books need wider inner margins so the text doesn’t disappear into the spine.

All of this points towards a pretty wide page. Most CS textbooks—at least the ones on my bookshelf—are 7.5 inches wide. I tried hard to come up with a design that fit the code, asides, and healthy margins in that width while still giving a text size that didn’t require a magnifying glass. Eventually, I conceded defeat.

Once I tried designing a set of metrics for an 8 inch wide page, everything fell into place. I could have enough breathing room around the text to make it enjoyable to read, a decent length for the code snippets, and plenty of room for the asides. (Using a narrower font for the asides helped too).

I would have leaned on LaTeX and pandoc, even if builds are slower and the final result looks slightly worse than hand-crafting the final product in Adobe InDesign. (Is it worth it though?) But I noped out of there as soon as I saw that javascript and InDesign were entering the fray—it makes me appreciate Knuth even more.

(Also, I love the finale where the whole book is converted to a single PNG and then pixel-diffed. Talk about track changes!)


Jim Bagrow
Jim Bagrow
Associate Professor of Mathematics & Statistics

My research interests include complex networks, computational social science, and data science.