Table of Contents: Character Style Improvements
TOCs need to be able to do three different things with character styles that are included in text in a generated TOC:
1. The Character Style stays present in the TOC (this is currently what InDesign does)
2. The Character Style is stripped.
3. The Character Style is mapped to another character style.
These settings should accessible in the Style: <stylename> section of the TOC options -- customizable for each paragraph style used to generate the TOC.
The most notable use for the mapping style is when the typeface between the TOC and the body text of the book differs, or when the TOC needs to use a different weight/style for legibility but still keep some formatting beyond the paragraph style.
YES YES YES. Please.
Laura Scott commented
Often I reverse the color of the chapter title on the page. It would be nice to be able to strip that from the TOC. Being able to map styles would be the bee's knees.
Adam Jury-Last commented
Lukas: That's correct. If you wanted to use GREP styles in the Paragraph Styles that make up the TOC as a direct translation, that should work cleanly.
(There are definitely some complexities regarding GREP styles and Nested Styles that may be worth considering here, too.)
Lukas Engqvist commented
This would not include GREP styles since they are part of paragraph style right?
This would be a great help. I use a single para style for a chapter number and title, with a forced return between each if necessary for the design, and then a character style for the title if design calls for it. But then the TOC generated includes that character style. i don't want that. (And I do this for EPUB export so that the entire chapter opener is a single h1 or h2 etc.)