Hiding a subtitle from the TOC

We would like to hide a chapter subtitle from the table of contents in the PDF export.

We have tried the following that sucessfully hides the subtitles in the book’s XHTML source:

[data-id="toc"] .chapter-subtitle{
  display: none !important;
}

but the subtitle remains in the final PDF export!

In this case, the source XHTML rendering does not match the final PDF output. What CSS code would you recommend?

Thanks.

Hi @frenaville – you should be able to use the following CSS to do this:


#toc .chapter-subtitle {
  display: none;
}

Target the ID of the toc element itself rather than the [data-id] and it ought to work.

1 Like