Add TOC title into TOC
Post here questions and problems related to editing and publishing DITA content.
			- 
				gyinshuen
- Posts: 6
- Joined: Tue Sep 09, 2025 11:17 am
Add TOC title into TOC
Hi,
Do I have a way to insert TOC title (Contents) into DITA PDF toc? Just like the left-hand side of the image shown, the right-hand side shows my DITA PDF-CSS output.
			
			
						Do I have a way to insert TOC title (Contents) into DITA PDF toc? Just like the left-hand side of the image shown, the right-hand side shows my DITA PDF-CSS output.
image.png
You do not have the required permissions to view the files attached to this post.
			
									
						- 
				julien_lacour
- Posts: 726
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Add TOC title into TOC
Post by julien_lacour »
Hi,
Yes, you have the possibility to insert it, there's a use-case in our user-guide from which you can start the customization:
Julien
			
			
									
									
						Yes, you have the possibility to insert it, there's a use-case in our user-guide from which you can start the customization:
-  The XSLT part is similar except <xsl:next-match/> must be called before the actual <div>:
Code: Select all <xsl:template match="*[contains(@class, 'toc/title')]" mode="div-it"> <xsl:next-match/> <div> <xsl:attribute name="class" select="'- toc/anchor anchor'"/> <xsl:attribute name="id" select="'toc-anchor'"/> </div> </xsl:template>
-  Replace all the CSS by:
Code: Select all *[class ~= "toc/anchor"] { content: "Contents"; -oxy-link: "#toc-anchor"; } *[class ~= "toc/anchor"]:after { content: leader('.') target-counter(attr(id), page); }
Julien
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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