10 Chapter Title Styling

This chapter will cover how to add special formatting to chapter titles:

  • Italicizing within a chapter title
  • Forcing a break in a chapter title
  • Numberless chapters

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:

title1

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:

title2

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:

  1. Go to “Appearance” –> “Theme Options”
  2. Check the box for “Enable chapter types taxonomy”
  3. 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”:

title3

This will result in the chapter title appearing without a number across all exports, and a Table of Contents will look something like this:

1. A Great Chapter
2. Another Great Chapter
A Numberless Chapter
3. A Wonderful Chapter

Comments are closed.