Add chapter, appendix, or part numbers to TOC page numbers

Use a new getChapterPrefix template to number TOC entries.

This exercise applies only if you are publishing from a bookmap. Chapter, appendix and part numbering depend on the presence of the <chapter>, <appendix> and <part> elements, which aren’t available in a map.

  1. Copy the entire getChapterPrefix template into custom.xsl (xsl).

    You can find this template in GetChapterPrefix template.

    Note: You could copy this template into any of the .xsl files you’ve added to your plugin, including toc.xsl, but it’s just as easy to copy it into custom.xsl. You can see right away it’s a custom template that didn’t come with the PDF plugin.
  2. Copy the template that begins with the following ...