Which would you prefer: more options for the TOC extension or a separate "enhanced" TOC extension? #835
-
Hello all! I've been trying out Yellow and really enjoying it. I've made a version of the Table of Contents extension with some changes, inspired by the useful suggestions and examples in discussion #544.
Old style:
New style:
@markseuffert asked whether this ought to be its own extension, given that most people may not need the extra options. I think the changes should be implemented in the main extension because 1) properly marked-up and nested lists are better for accessibility, and 2) it is more elegant and efficient to use Here is my proposal: make it so the default settings and styling create the same result as the previous version. (So, headings up to I would like to hear other people's thoughts on this! P. S. I am not a programmer, and my code undoubtedly needs editing first—I forgot to take out extraneous comments and it can probably be written more succinctly/correctly. I hope you can understand the methods used from my code. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hello Neville. I agree that the limitation to level 2 headings can be confusing, it's not obvious to new users why the table of contents shows a coarser level of headings while the document itself has a finer level of headings. Somewhere there is a line between features that everyone needs and features that are rarely used. With multiple extensions we may be able to strike a balance between simplicity and usefulness. I suggest to make a basic toc extension with all levels of headings and an enhanced toc extension for additional features. |
Beta Was this translation helpful? Give feedback.
-
Sounds good! I'll close my pull request and make a new one that is more pared down. |
Beta Was this translation helpful? Give feedback.
-
I updated the toc extension for you, now it supports all levels of headings. Hope you like it. |
Beta Was this translation helpful? Give feedback.
Hello Neville. I agree that the limitation to level 2 headings can be confusing, it's not obvious to new users why the table of contents shows a coarser level of headings while the document itself has a finer level of headings. Somewhere there is a line between features that everyone needs and features that are rarely used. With multiple extensions we may be able to strike a balance between simplicity and usefulness. I suggest to make a basic toc extension with all levels of headings and an enhanced toc extension for additional features.