I created a Table Of Contents method based on the example in your API and combined it with a styled sentence (i.e., with font style changes), also based on the example in your API. However, the styled sentence negated all of the Heading style fonts. The method is included in this message. How can you keep the Heading styles? In the attached code, I tried reverting back to the original font settings, but that did not work either.
The code file is attached as a text document.