Scoped Table of Contents
See original GitHub issueWhat is the problem?
I am trying to create an navigatable index of figures, glossaries, tables in markdown (f.e., by applying some ‘scope’ syntax, and regenerating the index by looking up all the content with the same scope).
The already working table of contents seems like it could be enhanced to do this.
I’m not sure if it is feasable to do so, but it would be a great addition to be able to do so.
How can I reproduce it?
# Main Title
(Modified feature 'table of contents': The usual table of contents goes here, but for headlines marked with scope syntax, only the main headline of that section will appear in the TOC, none of it's sub-headlines.)
1. [Section 1](#section-1)
2. [Section 2](#section-2)
3. [Glossary](#glossary)
4. [Resources](#resources)
## Section 1
## Section 2
## Glossary <!-- scope: glossary -->
(New feature: Trying to introduce index/table of contents with scope 'glossary' here. The fragment IDs could be prefixed with that scope, like the following links simulate.)
1. [Term 1](#glossary-term-1)
2. [Term 2](#glossary-term-2)
### Term 1 <!-- Won't be shown in main TOC, but in the Glossary index. -->
Term definition.
### Term 2 <!-- Neither will this. -->
Term definition.
## Resources
Some additional content.
It would be great to be able to call a command “Update all table of contents/indices”, of course.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Inserting a table of contents in Microsoft Word - Scope Training
Inserting a table of contents in Microsoft Word. There are two ways to insert a table of contents in word; the hard way...
Read more >scoped application with a table extended from knowledge
Hi All, I am creating a scoped application and i would like to create a table and extend the functionalities of knowledge.
Read more >Scope (Table) Property - Business Central - Microsoft Learn
The scope property for tables sets whether the scope is cloud or on-prem in AL.
Read more >Using the scope attribute to associate header cells and ... - W3C
The objective of this technique is to associate header cells with data cells in complex tables using the scope attribute. The scope attribute...
Read more >Specifying the scope for the table - No Magic Documentation
The scope is defined, and the contents of the table are updated with the elements from the selected scope. In the future, all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the information. Your have provided a great example.
Regarding to your last comment, we do have a undocumented command to do that. It is
<!-- no toc -->
and was added in v2.6.0.Also, want to propose a way to disable toc inline:
This allow user to create
see also
list that the plugin will not interfere:And to get the benefit from the plugin, user can temporary change
<!-- toc disable -->
to<!-- toc for #topics -->
, save the file to get the toc reference updated, and then switch back to<!-- toc disable -->
and remove the extra entries.Or allow user to right-click and update the toc when it is disabled: