Remove parent in toc from pdf but not children
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
			- 
				Leighb
 - Posts: 8
 - Joined: Tue Apr 08, 2025 7:32 pm
 
Remove parent in toc from pdf but not children
I am using Oxygen and Chemistry 27.1 I know that it is common to have multiple ditamaps for different output but for a variety of reasons, we have just one. In the print, we have some Title Pages that only appear in the print. They have the same title as the next Intro Page of dita content (a sibling to the Title Page). That Intro Page has nested content. I would like the toc to point to the Title Page of the book but I don't want to see the duplicate titles in the toc. Obviously, if I add toc="no" to the Intro Page, all the nested content is removed as well. I want to see the nested content in the toc just not the Intro Page title. In my research, I found that adding toc="yes" to the nested content might work. It did not. Is there away around this that I am not seeing?
Thanks,
Leigh
			
			
									
									
						Thanks,
Leigh
- 
				julien_lacour
 - Posts: 729
 - Joined: Wed Oct 16, 2019 3:47 pm
 
Re: Remove parent in toc from pdf but not children
Post by julien_lacour »
Hello Leigh,
If I understand correctly, your current ditamap structure leads to duplicate entries in the PDF TOC.
If you are using a DITA Map PDF - based on HTML5 & CSS based scenario you should be able to filter the extra title by debugging the CSS in your favorite browser, simply match one of the titles, and remove it with display: none.
Regards,
Julien
			
			
									
									
						If I understand correctly, your current ditamap structure leads to duplicate entries in the PDF TOC.
If you are using a DITA Map PDF - based on HTML5 & CSS based scenario you should be able to filter the extra title by debugging the CSS in your favorite browser, simply match one of the titles, and remove it with display: none.
Regards,
Julien
- 
				Leighb
 - Posts: 8
 - Joined: Tue Apr 08, 2025 7:32 pm
 
Re: Remove parent in toc from pdf but not children
Thanks Julien. I am using DITA Map PDF - based on HTML5 & CSS. You are correct that I have a duplicate title. I don't want to remove the 2nd title from anything except in the TOC for the PDF/print. The Title page only appears in the print (audience="print" in the ditamap). I still need the Intro file (and the nested content) to be present in the pdf (and elsewhere) which is why I was hoping that toc="yes" on the nested content would work since that is exactly what I need. Won't display:none remove the title from all output? Maybe I misunderstood your comment?
Thanks,
Leigh
			
			
									
									
						Thanks,
Leigh
- 
				julien_lacour
 - Posts: 729
 - Joined: Wed Oct 16, 2019 3:47 pm
 
Re: Remove parent in toc from pdf but not children
Post by julien_lacour »
Hello Leigh,
If you open the merged.html file generated during the transformation in your browser and inspect its structure, you will see that each title is contained in its own element, so you should be able to filter it using display: none in a custom CSS stylesheet. In a similar way the titles in the rest of the PDF content are different elements, so discarding the elements in the TOC will not affect the other titles.
Regards,
Julien
			
			
									
									
						If you open the merged.html file generated during the transformation in your browser and inspect its structure, you will see that each title is contained in its own element, so you should be able to filter it using display: none in a custom CSS stylesheet. In a similar way the titles in the rest of the PDF content are different elements, so discarding the elements in the TOC will not affect the other titles.
Regards,
Julien
			
				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