Need to change font in the TOC Title

Post here questions and problems related to editing and publishing DITA content.
toolie
Posts: 26
Joined: Thu Jan 29, 2015 2:40 am

Need to change font in the TOC Title

Post by toolie »

Hi there, I've used the Styles Basket, and tried to fix this on my own, but I cannot seem to affect the font of the Table of Contents TITLE, which stubbornly remains in the wrong font. I'm using the DITA Map PDF based on HTML5 and CSS but I'm using the Bookmap rather than a DITAMap.

I asked about this in today's webinar, but forgot to mention that I am using a Bookmap. The answer provided was this:

Code: Select all

*[class~="toc/toc-title"] {
    font-family: 'Literata', serif;    <-- (I put in the font I wanted)
}
But this did NOT work.

Can you advise how I can change the font of the TOC Title to the font I want?

Thanks!
Toolie Garner
julien_lacour
Posts: 667
Joined: Wed Oct 16, 2019 3:47 pm

Re: Need to change font in the TOC Title

Post by julien_lacour »

Hello,

The correct selector is the following one:

Code: Select all

*[class~="toc/title"] {
    font-family: 'Literata', serif;
}
Also you need to check that the font is installed on your machine or imported in your CSS stylesheet.
For more details about Fonts, please check the documentation.

Regards,
Julien
toolie
Posts: 26
Joined: Thu Jan 29, 2015 2:40 am

Re: Need to change font in the TOC Title

Post by toolie »

Yup, that worked. I already had the fonts imported and they worked everywhere EXCEPT that one title. Thank you Julien!
Toolie Garner
Post Reply