I see how I can use regexs to exclude arbitrary lines, but I would like all subheadings to be excluded as well, if a parent header is excluded. However, I only want my Heading 1s to differ by name, while all sub-sections of each Heading 1 to use the same naming structure. So if I had something like:
* Phase 1 - master the kraken
* step 1
* step 2
* Phase 2 - deploy the kraken
* step 1
* step 2
* step 3
and only wanted to show "Phase 1" items for now, is there a way to get the TOC Macro to also exclude "Phase 2" and everything below it, without having to rename all the sub-sections with a string unique to phase 2 so a regex can find them all?
Not sure what your use case is (why you want to do this), but I cannot think of any way to do what you want to do with the ToC macro without adding some constant text to headings you don't want to appear.
The only other way I can think of is the wrap the ToC macro in a user macro, then apply CSS to hide what your don't want (nth child selectors). Or just create a custom user macro.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.