Book Themes, Part 1: Frames and Pictures

One of the most complex aspects of Pressbooks is the way our book themes work across different formats. It even confuses us sometimes. In a series of posts this week, I hope to clarify some of the concepts that underpin our book theming system, reflect on how it has evolved over the years, and outline where we hope to take book themes in the future.

A Framing Device

Conceptually, I find it helpful to think of our book themes as two things: a frame and a picture.

A black and white photo of Marshall McLuhan leaning against a mantlepiece in a hand-drawn picture frame.
Marshall McLuhan, framed. (Wikimedia Commons)

Take McLuhan, our default book theme. It’s really two elements in one. The first element is a (fairly conventional) WordPress theme which provides the user interface for reading a Pressbooks book on the web. This is the “frame” — the user interface (UI) for readers of a webbook. The other component is the “picture” — styles which format the content of the book for display, either within the webbook “frame” or in other formats such as PDF, EPUB, or MOBI.

McLuhan provides the UI for all Pressbooks webbooks, even those that use other styles for their content. All other book themes are WordPress child themes, which means that they inherit the “frame” (the webbook UI) from McLuhan, the parent theme1. So if you change your book’s theme to Jacobs, you’re putting a new “picture” in the original frame:

A black and white photo of Jane Jacobs in a hand-drawn picture frame.
Jane Jacobs, framed. (Wikimedia Commons)

To demonstrate this more concretely, here’s a webbook using McLuhan:

A screenshot of the first chapter of Herman Melville's
Moby Dick in McLuhan.

And the same webbook using Jacobs:

A screenshot of
Moby Dick in Jacobs.

No difference except the typography of the book content.

Luther’s Legacy

Our old default book theme was Luther. When we built Luther, we made a tactical error and mixed the content styles for web into the UI styles. By failing to separate these concerns, we made the transition from Luther to McLuhan more awkward than it could have been; when we rebuilt the webbook UI in McLuhan, we had to supply some (now missing) content styles for old themes2 that had been relying on the Luther webbook stylesheet to properly display some of the webbook content. We’ve learned from this mistake, and all of our work on webbook UI and web content styles going forward will emphasize a proper separation of concerns.

Next: What’s Buckram?

The next part of this series will be a deep dive into Buckram, the SCSS book component library that is at the heart of our new batch of themes. Until next time!

  1. That being said, child themes can override components of the parent themes, so one could make a child theme that changed any aspect of the webbook UI by replacing or modifying template files.
  2. Only old themes, though! More on that in part two.

Sprint Preview: April 2–13

Here’s what we will be focusing on for our first sprint of Q2:

  • Buckram development: We are working to finalize a stable release of Buckram, our book theme component library, which will include improvements to image layout, ordered lists, running content, and textboxes.
  • Pressbooks 5.x and McLuhan bug fixes: We will be working on more improvements to McLuhan related to author name display and the web table of contents.
  • Expandable content: We will be implementing a new interactive content feature — content blocks which are progressively enhanced to be expandable and collapsible in the webbook.

(Note: We’ve decided to push the development of the new version tracking feature that was planned for our past sprint to a subsequent sprint.)

Pressbooks 5.2.0, McLuhan 2.2.0, and Aldine 1.2.0

Minor releases of Pressbooks, McLuhan, and Aldine, are now available. These releases add a few small but oft-requested features and fix a variety of minor bugs. Please note that Pressbooks 5.2.0 and McLuhan 2.2.0 are inderdependent and must be updated together.

Thanks to Ed Beck, Antonio Devís at Books for Languages, Thomas Dumm at Delivros, Josie Gray at BCcampus, Mike Shiflet at Ohio State, and Justin Swapp for the bug reports and suggestions!

Full changelogs are available here:

Pressbooks is on Open Collective

With our sprint previews, idea board, and various other initiatives, we’re increasing our efforts to foster and engage the Pressbooks Open Source community 1. As part of this process, we have decided to set up an Open Collective account for the Pressbooks Open Source project so that our Open Source users can, if they wish to, contribute financially to the ongoing development of Pressbooks. While we are very proud of our PressbooksEDU enterprise hosting service (and it remains the best way to provide stable, ongoing financial support to the project), we recognize that this isn’t the right option for many users, and that those who still rely on Pressbooks may want a different way to contribute. If that’s you, please consider backing us on Open Collective, with either a one-time donation or a small monthly contribution. Either way, even if you’re not in a position to contribute, we’re glad to have you in our Open Source community!

  1. And if you or anyone you know wants to join our monthly Slack calls, it’s now a whole lot easier.

Sprint Preview: March 19–30

Our last sprint of Q1, running March 19–30, will focus on:

  • Further bug fixes and improvements to Aldine based on user feedback
  • Further bug fixes and improvements to McLuhan based on user feedback
  • Development of a new version-tracking feature in McLuhan which will allow readers to compare chapters in a cloned webbook to the source book
  • More improvements to Buckram and more theme conversion work
  • Internal work to improve Pressbooks.com infrastructure