mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Is there a way to make the TOC more flexible?

Open stO-Orz opened this issue 5 years ago • 4 comments

Hi, I start to use mdBook recently, it's amazing!

I'd like to know that is there any method to make the table of content more flexible?

What I means is, for instance, make the TOC like this,

  1. allow articles without numbering, for example
Section

- Article 1
- Article 2
- Article 3

instead of

Section

1. Article 1
2. Article 2
3. Article 3
  1. allow articles in different sections be numbered all from begining
Section 1

1. Article 1
2. Article 2

Section 2

1. Article 1
2. Article 2

instead of

Section 1

1. Article 1
2. Article 2

Section 2

3. Article 1
4. Article 2

Is there any way to realize that? :)

stO-Orz avatar Nov 09 '20 16:11 stO-Orz

You can add articles without numbering, just don't add - in front of them.

# Part One
[Intro](./index.md)

However numbering separately for each section seems not possible for now unless we make a preprocessor for it.

kolulu23 avatar May 31 '21 06:05 kolulu23

OK, thanks for your reply, I'll try it. :)

stO-Orz avatar Jun 05 '21 12:06 stO-Orz

is there any news about this? I would also be interested in the function

Tealk avatar Jan 29 '22 14:01 Tealk

I think no-section-label = true now works for some of the scenarios described in this issue.

epogrebnyak avatar Apr 30 '24 09:04 epogrebnyak