Need to change font in the TOC Title

toolie
Posts: 5
Joined: Thu Jan 29, 2015 2:40 am

Need to change font in the TOC Title

Post by toolie » Thu Jul 16, 2020 2:13 am

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: 99
Joined: Wed Oct 16, 2019 3:47 pm

Re: Need to change font in the TOC Title

Post by julien_lacour » Thu Jul 16, 2020 10:08 am

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: 5
Joined: Thu Jan 29, 2015 2:40 am

Re: Need to change font in the TOC Title

Post by toolie » Sun Jul 19, 2020 1:46 am

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

Post Reply