It is possible to support multiple styles of TOC entries for different templates.
By default, the paragraph styles applied to all titles in all generated FM files are the same (title.0, title.1, etc., as defined by the Book structure application). When pulled into a TOC file, they become “title.0TOC”, “title.1TOC”, and so on. Your TOC generated list template (“gentpl~toc.fm”) defines the handing for these styles on the “TOC” reference page. If you want to be able to support multiple types of entries, such as “Chapter”, “Appendix”, and “Part”, you’ll need to do the following.
The component template (tpl~<mapelemtype>.fm) will apply alternate formatting to the specific book component, but if you want the underlying paragraph styles to change, you need to create a modified EDD that applies the alternate style, and update the template to support that style. The actual style may look the same, but the name needs to be different so it can be handled separately in the TOC template.
For example, if you want to add support for the appendix element and have your TOC include both Chapter and Appendix labels, you could do the following:
When a book is generated and this template is applied, this will apply the title-appendix.0 style to the top-level heading in the appendix files.
For each new TOC entry type, you’ll need to add that paragraph style to the GeneratedFile-toc section of the ditafmx-bookbuild.ini file. Be sure to update the NumTags parameter to match the number of paragraph tags used to generate the TOC.
You can use the method described above to handle as many alternate TOC entry types that you need in your book.