number-headings-obsidian icon indicating copy to clipboard operation
number-headings-obsidian copied to clipboard

Is it possible to add both the "skipped " and "toc" attributes to a single heading?

Open kickTiger opened this issue 1 year ago • 3 comments

Thank you for the update. I've already downloaded and tried the latest 1.16.0 update. The features are fantastic, especially the skip and table of contents generation functions.

Is it possible to add both the "skipped" and "toc" attributes to a single heading?

After testing, I have a question: Is it possible to add both the "skipped " and "toc" attributes to a single heading?

This is because if I want this heading to serve as a table of contents title, I might prefer it not to be included in the numbering range but let other content continue numbering while this table of contents title stands out.

I tried adding "^skipped ^toc" after the heading

I tried adding "^skipped ^toc" after the heading and attempted to adjust their order, but it didn't seem to work. I'm not sure if I'm using the correct syntax, or if this feature is not supported.

## heading ^skipped ^toc
content

I would appreciate it if you could consider supporting the ability to use both placeholders after the same heading.

kickTiger avatar Oct 03 '23 16:10 kickTiger

Interesting question. I'll look into it

onlyafly avatar Oct 08 '23 16:10 onlyafly

Hello,

I found a one-time workaround - specify the same attribute in both categories - e.g. typing "^toc" both as a "skip headings" anchor and "table of contents" anchor makes my ToC skipped from numbering and the ToC is inserted. Of course it is not a perfect solution, as now I can't use the "skip headings" feature anymore, but it will do for now in my document.

wyjek avatar Apr 24 '24 07:04 wyjek

Hello,

I found a one-time workaround - specify the same attribute in both categories - e.g. typing "^toc" both as a "skip headings" anchor and "table of contents" anchor makes my ToC skipped from numbering and the ToC is inserted. Of course it is not a perfect solution, as now I can't use the "skip headings" feature anymore, but it will do for now in my document.

I've also considered a method:

  1. When entering automatic numbering in the YAML area, start from level 2 or 3 headings.
  2. Then, use level 1 headings for content that doesn't need to be included in the table of contents; thus, the skipped content won't be numbered when generating the table of contents.

kickTiger avatar Apr 24 '24 08:04 kickTiger