Creating table of contents of a section

Hello,

I would like to create a table of contents, but only within a specific subsection. I’ll explain with an actual example

--------------------------------------
TOC
  - Introduction - Header 1
  - Options - Header 1
    - Option 1 - Header 2
    - Option 2 - Header 2
--------------------------------------

*** Introduction - Header 1 ***
Welcome to the introduction.

*** Options - Header 1 ***
There are many possible options. Here is the list of options you have
----THIS TOC IS WHAT I AM TRYING TO HAVE AUTOMATICALLY-----
   - Option 1 - Header 2
   - Option 2 - Header 2
----THIS TOC IS WHAT I AM TRYING TO HAVE AUTOMATICALLY-----

** Option 1 - Header 2 **
This is the option 1.

** Option 2 - Header 2 **
This is the option 2.

Is it possible to obtain this “subtoc” for all the Header 2 entries contained in the Options - Header 1 ?

Thank you

The short answer is yes. There have been a couple of threads on this forum about the same topic:

I also discuss why using the term “section” in this context is not a good idea here. Your question is really about heading levels and including different levels of heading in separate tables of content. To achieve what you require it may be best to create custom heading styles to more clearly identify which headings are to be included in which ToC.