Page 1 of 1

Need to change font in the TOC Title

Posted: Thu Jul 16, 2020 2:13 am
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!

Re: Need to change font in the TOC Title

Posted: Thu Jul 16, 2020 10:08 am
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

Re: Need to change font in the TOC Title

Posted: Sun Jul 19, 2020 1:46 am
by toolie
Yup, that worked. I already had the fonts imported and they worked everywhere EXCEPT that one title. Thank you Julien!