Weeknotes № 17
Book Typesetting
We spent a lot of time working on laying out our book, and are getting much closer now. Even though we were “80%” done already, getting all the details right takes a lot of time and tweaking:
-
We added internal links to the book
-
We added warnings for widows and orphans
-
We added support for print margins (i.e. margins that differ per page)
-
We added support to supress headers on title pages and empty pages (the header shows the chapter name and page number)
-
We added support for state to our attributed string builder library, this threads state through the rendering (useful for e.g. footnotes or numbering things)
-
We added a PDF outline to the book (the “table of contents” you see in Preview)
-
We tweaked all the small details (spacing, line height, list rendering, etc.)
-
We spent a long time going back and forth on different styles for rendering our diagrams. The view tree diagrams that we want to show have code, a preview and a diagram. Getting these all on a single page with a good layout wasn’t easy at all.
I think we’re very close now to the output that we want. The main thing left is styling the diagrams further, not just the view tree diagrams but also render trees, layout trees, and so on.
Here’s a sample page showing the current state:
We spent a lot of time with the family while over in The Netherlands, and for the first time in half a year, I ran more than 100kms this week. I’m looking forward to build that mileage out again.