Page 1 of 1

Remove just the Index from pdf-css output - Chemistry

Posted: Thu Aug 07, 2025 4:12 pm
by axhxu
Hi,
Does anyone have a simple solution to exclude just the index from being included in the pdf?
Thanks

Re: Remove just the Index from pdf-css output - Chemistry

Posted: Mon Aug 11, 2025 11:06 am
by julien_lacour
Hello,

If you are generating PDF using the DITA Map PDF - based on HTML5 & CSS scenario, you can add the following rules into a custom CSS stylesheet:

Code: Select all

/* Remove the index from the TOC */
*[class ~= "map/topicref"][is-index] {
  display: none;
}
/* Remove the index from the content and the bookmarks */
*[class ~= "index/groups"] {
  display: none;
  bookmark-level: 0;
}
If you are using a <bookmap>, the index is generated by the presence of the <indexlist/> element, if you remove it, it will not be generated.

Regards,
Julien