50 Chapter Title Styling
There are a few ways you can style your chapter titles. You can italicize terms within the title, force a line break, or designate a chapter as numberless.
Italicizing Within A Chapter Title
If you have the name of another text within a chapter title, you will probably want to italicize it to keep with standard conventions. This is simple to do. When entering your chapter title, simply wrap the section you wish to italicize in <em> tags like this:
This will then display the tagged text as italicized in all your outputs, including the table of contents.
Forcing a Break in Your Chapter Headings
Let’s say you have a chapter heading, and, in the theme you’ve chosen, the chapter heading comes out like this in the PDF:
Forcing a Break in Your Chapter
Headings
But you would like it to come out like this:
Forcing a Break in
Your Chapter Headings
You can do this by entering <br /> in the Chapter Title field in the Pressbooks editor:
Notes and Explanations
- The
<br />
is the HTML tag for “break.” - Make sure there is no space on either side of the
<br />
tag. - Pressbooks will strip this break when generating the Table of Contents, so the title will appear on one line
- This break will also be present in the ebook outputs, which might cause some funny breaking on small screens.
Numberless Chapters
Occasionally, you may have enabled the “Display Chapter Numbers” option in your theme options (which automatically numbers your chapters), but have a handful of chapters to which you do not want to apply numbers. To do so, you’ll need to enable the chapter types taxonomy:
- Go to “Appearance” –> “Theme Options”
- Check the box for “Enable chapter types taxonomy”
- Save changes
Now, when you go to edit your chapters, you will see this box on the right hand menu, where you can select “Numberless”:
This will result in the chapter title appearing without a number across all exports, and a Table of Contents will look something like this:
2. Another Great Chapter
A Numberless Chapter
3. A Wonderful Chapter