Page 1 of 1

Index in PDF Output: A, B, C, D...sub-headings for quicker access

Posted: Mon Jun 08, 2020 3:00 pm
by Anonymous1
Hi,

the table of contents in our PDF output contains a link to the index. The link in the TOC is simply called "Index. Now we would like our customers to be able to jump directly to the letter they are looking for.

Would it be possible to have sub-headings with each letter in the TOC?

Like this:

Index
  • A
  • B
  • C
  • D
  • E
  • etc.

Re: Index in PDF Output: A, B, C, D...sub-headings for quicker access

Posted: Tue Jun 09, 2020 12:00 pm
by Radu
Hi Ben,

I do not have a good idea about how this could be done. Are you using the XSL-FO based approach to produce the PDF or our CSS-based approach?

Regards,
Radu

Re: Index in PDF Output: A, B, C, D...sub-headings for quicker access

Posted: Tue Jun 09, 2020 12:01 pm
by Anonymous1
Hi Radu,

we are using XSL-FO.

Re: Index in PDF Output: A, B, C, D...sub-headings for quicker access

Posted: Wed Jun 10, 2020 9:17 am
by Radu
Hi,

This is probably feasible but you need time to investigate how this could be done, I do not have a quick solution for it.
In the XSLT stylesheet plugins/org.dita.pdf2/xsl/fo/index.xsl there is a template named createIndex which seems to iterate the index groups and create xsl:fo elements for them. You would probably need to do something similar when creating the TOC, iterate the index groups and for each of them create an entr in the TOC. You might also need to add extra IDs for each element created for an index group so that you can link to each of them from the TOC.

Regards,
Radu

Re: Index in PDF Output: A, B, C, D...sub-headings for quicker access

Posted: Wed Jun 10, 2020 4:27 pm
by Anonymous1
Thank you very much for looking into this and pointing me to a possible way of doing this.

We will discuss internaly if this is worth pursuing.