Aidurber/obsidian-plugin-dynamic-toc

FR: Wikipedia style lists.

spoon-m4a opened this issue · 2 comments

I really like the Number list style, but I wonder if it would be possible to have it in the Wikipedia style, where you have 1. for your main entry, and children would be prefixed with 1.1, 1.2, etc. I've attached an image for reference

Number(Wiki style)

Markdown doesn't help us out by default here. I'd need to build a custom heading renderer. I'll add it to the backlog and have a play around when I can find the time.

Thanks for the suggestion!

For anyone who really likes this feature, you can directly apply this to your whole document with some custom css:

https://help.obsidian.md/How+to/Add+custom+styles

h2:before {
    counter-increment: h2counter;
    content: counter(h2counter) "\0000a0\0000a0";
}

h3:before {
    counter-increment: h3counter;
    content: counter(h2counter) "." counter(h3counter) "\0000a0\0000a0";
}

h4:before {
    counter-increment: h4counter;
    content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "\0000a0\0000a0";
}

h5:before {
    counter-increment: h5counter;
    content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "\0000a0\0000a0";
}

h6:before {
    counter-increment: h6counter;
    content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter) "\0000a0\0000a0";
}

Which looks like

image