Collapsible Subsections for Webbooks
Collapsible subsections are useful for users whose books have long chapters with multiple smaller parts. Examples of works that this feature would be useful for include: textbooks, monographs, course syllabi, and more.
Four themes on Pressbooks offer the option to have collapsible subsections within a webbook chapter:
- McLuhan
- Clarke
- Asimov
- Jacobs
Enabling Collapsible Subsections
If you are using the McLuhan, Clarke, Asimov, or Jacobs themes, you can enable collapsible subsections by following these steps:
- Go to Appearance > Theme Options > Web Options from the left-hand menu of your book’s dashboard
- Scroll down to Collapse Sections and click the box next to “Collapse sections within front matter, chapters, and back matter”
- Click Save Changes
You can now add subsections to your webbook using the method below.
Creating Collapsible Subsections in Your Webbook
Now that you’ve enabled the setting, you need to implement them in your chapters. To do this, follow these steps:
- Access your chapter from the Organize page
- Create the headings that you’d like to become your subsection titles, if they aren’t already in the body of your text
- Highlight the heading and tag it with a Heading 1 paragraph style from the visual editor toolbar
- Repeat for each subsection in the chapter.
- Click Save on the chapter
After, you can view your webbook to see the result. Readers can click the subsection heading or the plus mark next to it to open the subsection.
Each subsection is independent of the other. If you expand one section, the other two will stay collapsed. Similarly, if you collapse a section, the rest will remain expanded.
Click on the minus or plus icons at any time to collapse or expand the section.
Feedback/Errata