Structured numbered headers and nested files/notes in navigaton/file explorer part

Use case or problem

It would be a great thing to ease up comprehension and orientation within the text of the note itself in order to use Obsidian also as knowledge base app that would eventually replace a pan and notebook on daily bases

Proposed solution

Structured numbered headers and nested files/notes in navigation/file explorer part

Current workaround (optional)

Related feature requests (optional)

5 Likes

I’d also like to see the possibility to toggle numbered headers. At the moment, if you have different and multiple header levels orientation can get a bit difficult.

Workarounds:

  • Manual numbering is a workaround but no long-term solution.
  • Numbering via CSS (e.g. see here) is possible and easy but has to be set for every vault and does not affect the Outline pane.

Thus, an option in the preferences with a few possible settings (suffixes etc.) would be very nice.

Since the manual implementation of numbered headers via custom CSS is not trivial (e.g. due the doubling in preview and editor mode and the complex nesting of html classes) a core plugin you can toggle the numbering of the headers with is a very important feature for working with structured notes. Is there any planning for implementing this?

I also missed having numbered headings, so I solved this by writing a plugin.

The plugin works by going through all the headings in your document and numbering them.

Should be available in Obsidian’s community plugins list soon, but until then, you can get it from GitHub - onlyafly/header-numbering-obsidian: Automatically number headings in a document in Obsidian

2 Likes

Thanks a lot for creating this plugin! :partying_face: Unfortunately, the »How to install« section in Github is not completely clear. It reads that you have to unzip the release but the only zipped file is the source code. When I copy the three non-zipped files to a new plugin folder in my vault the plugin appears, however some settings doesn’t seem to be available (e.g. there’s no button to activate/deactivate the automatic numbering. The whole settings window seems incomplete. Did I do something wrong?

Does the plugin add text to the text of a note or simply displays the numbering of headings?

Hi @AtrusRiven: In order to apply the numbering, you have to run the command “Number all headings in document”. Press CMD+P (on Mac) or the equivalent on Windows/Linux, and then start typing the command “Number all headings in document”. It should auto-complete for you.

Thanks for the clarification. Does the plugin add “hard” text to my existing note text or just display a numbering before each heading?

Hi @AtrusRiven : The plugin adds actual text to the note along with each heading. There is also a command to remove the numbering afterwards if you decide you don’t want the numbering any more. Type CMD+P and then type “header numbering” to see the three commands.

Also, make sure to get the most recent version, as I’ve just fixed some bugs found by other users.

Thanks, @onlyafly, for the explanation! It were very useful to be able to decide whether just to display the header numbering or to add “hard” numbering to the text. But that’s an issue for another plugin or a feature, I suppose.

Do you know when your plugin will be available in Obsidian’s community plugins? Thanks again!

Should be available in a few days on the community list!

I’ve just renamed the plugin as requested by Obsidian’s authors, so you can now find it here: GitHub - onlyafly/number-headings-obsidian: Automatically number headings in a document in Obsidian</t

2 Likes