pressbooks/pressbooks — pull request #86 by drlippman (2014-11-26 02:57:44+00:00)
Title: Add TOC collapse option to pressbooks-book (Luther) theme

When a book contains a large number of parts and chapters, the pop out table of contents becomes insanely long, to the point of not being usable. This PR adds a new theme option to the main Luther theme to enable TOC collapsing by-part. Enabling the option enqueues a small script that does the work.

As a sidenote, the click-to-expand/collapse behavior causes problems if the part has part text, so the script skips collapsing any parts that contain part text.

If you want to try it out, I have it live on [this book](http://reader.opentextbookstore.com/ushistory2/).