I finally found a more acceptable workaround to this question after thinking over the experiments I conducted with this other question. It tries to clarify already given answers with a recipe based on @petermau’s idea which unfortunately missed the point on the list style.
It is still a workaround with serious drawbacks but it works: headings and TOC are automatically updated and remain consistent.
Headings styles for the appendixes define their own hierarchy: they are custom paragraph styles, say Appendix x linked to the corresponding Heading x, so that any change in Heading x cascades to the appendix style.
In Outline & Numbering
tab, set Outline level to the required level (when style is created with New…
on a heading style, outline level reverts to Text body) and choose a custom numbering style, say Appendix (more on that later, though list style creation should precede heading paragraph style).
Appendix x are now paragraph styles for lists which means their numbering are independent from standard headings (depending on built-in “unreachable” list style Numbering symbols ). Having attached them to an outline level causes them to be captured by the TOC engine and they will end up in the TOC.
List style Appendix must be tuned to duplicate the settings in Tools
→ Chapter Numbering
for seamless integration in the document. But the Numbering series can be freely chosen differently from the standard series, e.g. appendixes can be numbered alphabetically while chapters are numbered numerically.
This is where you incur inconvenience because the alternate styles are not real heading styles but define a list and the alternate headings must be treated as lists.
Use the Appendix x style as you would use Heading x (right style at the appropriate level), but …
To get correct numbering, you must “shift” the list item to the proper level with Tab
s at head of paragraph: no Tab
for level 1, one Tab
for level 2, etc.
Since Appendix x are attached to their outline level, all their properties are captured by the TOC engine, including their exotic numbering, and display as intended in the TOC.
It also works in field insertion when requesting Headings > Chapter or Reference (e.g. to add chapter title and number in the header area).
-
Summary of the inconveniences
-
Duplication of heading hierarchy
-
Duplication of chapter numbering in the list style
-
Manual positioning of alternate headings to corresponding list level