Customize TOC
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 21
- Joined: Mon Dec 05, 2022 9:35 am
Customize TOC
Post by [Stupid]_[User] »
Hello everyone!
I use "toc", "tablelist" and "figurelist" in my "ditamap". I can easily customize "toc" with font I need, but I can't do the same with my "tablelist" and "figurelist". Is it any way to change font style, size and etc in these "booklists"?
I use "toc", "tablelist" and "figurelist" in my "ditamap". I can easily customize "toc" with font I need, but I can't do the same with my "tablelist" and "figurelist". Is it any way to change font style, size and etc in these "booklists"?
-
- Posts: 160
- Joined: Mon Nov 24, 2014 1:49 pm
- Location: Greven/Germany
Re: Customize TOC
I think you need to override one of these attribute sets: https://github.com/dita-ot/dita-ot/blob ... f-attr.xsl
stefan-jung.org – Your DITA/DITA-OT XML consultant
-
- Posts: 666
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Customize TOC
Post by julien_lacour »
Hello,
Which transformation scenario are you using? The attribute-sets solution is valid for the DITA Map PDF - based on XSL-FO scenario:
For the DITA Map PDF - based on HTML5 & CSS scenario you can use rules similar to these ones:
FYI you can debug the CSS using your favorite browser, this will help you identify, modify and create CSS rules.
Regards,
Julien
Which transformation scenario are you using? The attribute-sets solution is valid for the DITA Map PDF - based on XSL-FO scenario:
Code: Select all
<xsl:attribute-set name ="__lotf__heading" use-attribute-sets="__toc__header">
<xsl:attribute name="font-size">40pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name ="__lotf__content" use-attribute-sets="base-font __toc__topic__content__booklist">
...
<xsl:attribute name="font-size">36pt</xsl:attribute>
</xsl:attribute-set>
Code: Select all
*[class ~= "placeholder/figurelist"] > *[class ~= "topic/title"] {
font-size: 40pt;
}
*[class ~= "placeholder/figurelist"] > *[class ~= "listentry/entry"] {
font-size: 36pt;
}
*[class ~= "placeholder/tablelist"] > *[class ~= "topic/title"] {
font-size: 40pt;
}
*[class ~= "placeholder/tablelist"] > *[class ~= "listentry/entry"] {
font-size: 36pt;
}
Regards,
Julien
-
- Posts: 21
- Joined: Mon Dec 05, 2022 9:35 am
Re: Customize TOC
Post by [Stupid]_[User] »
Hello, Julien!julien_lacour wrote: ↑Fri Dec 16, 2022 10:35 am Hello,
Which transformation scenario are you using? The attribute-sets solution is valid for the DITA Map PDF - based on XSL-FO scenario:For the DITA Map PDF - based on HTML5 & CSS scenario you can use rules similar to these ones:Code: Select all
<xsl:attribute-set name ="__lotf__heading" use-attribute-sets="__toc__header"> <xsl:attribute name="font-size">40pt</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name ="__lotf__content" use-attribute-sets="base-font __toc__topic__content__booklist"> ... <xsl:attribute name="font-size">36pt</xsl:attribute> </xsl:attribute-set>
FYI you can debug the CSS using your favorite browser, this will help you identify, modify and create CSS rules.Code: Select all
*[class ~= "placeholder/figurelist"] > *[class ~= "topic/title"] { font-size: 40pt; } *[class ~= "placeholder/figurelist"] > *[class ~= "listentry/entry"] { font-size: 36pt; } *[class ~= "placeholder/tablelist"] > *[class ~= "topic/title"] { font-size: 40pt; } *[class ~= "placeholder/tablelist"] > *[class ~= "listentry/entry"] { font-size: 36pt; }
Regards,
Julien
I use DITA Map PDF - based on HTML5 & CSS scenario. Your solution resolved my problem.
Thanks a lot!
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service