Giter Site home page Giter Site logo

number-headings-obsidian's People

Contributors

kassadin avatar onlyafly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

number-headings-obsidian's Issues

Version 1.3.0 does not work

I installed version 1.3.0, refreshed Obsidian, activate the plug-in, then get this on my screen:

image

But the headings are not numbered.

I reinstalled version 1.0.1, that worked. But when I reinstalled 1.3.0 that still does not work, then reinstalled 1.0.1 it did not work anymore either.

BTW, I am on MacOS.

numbing does not look correct

The numbering result of the following note is not correct.

---
number headings: first-level 1, max 6, _.1.1
---


# h1
## 1 h1-2
### 1.1 h1-2-1
## 2 h1-3
### 2.1 h1-3-1
### 2.2 h1-3-2

# h2
## 3 h2-1
### 3.1 h2-1-1
### 3.2 h2-1-2
## 4 h2-2

The expected result would be:

---
number headings: first-level 1, max 6, _.1.1
---

# h1
## 1 h1-2
### 1.1 h1-2-1
## 2 h1-3
### 2.1 h1-3-1
### 2.2 h1-3-2

# h2
## 1 h2-1
### 1.1 h2-1-1
### 1.2 h2-1-2
## 2 h2-2

Turn Auto-Numbering Off For Specific Files

The auto numbering option (that is enabled through the settings) triggers auto numbering of any file which is opened in the editor. Is there a possibility to turn this feature off for specific files? Adding a "manual" or "off" option to the front matter would solve the problem.

For me it interferes with the Kanban Plugin when I want to archive cards.

FR: Option to choose which letter/number to start numbering from

Hey, awesome plugin you've got here :D

One issue I've come accross is that in some situations, I want the numbering for a level 1 heading to start from a value different from 1.

For example, using the Longform Writing plugin, the sections of my thesis are split into different notes. So for chapter 2, for example, I want the numbering to start at 2, 2.1, etc. instead of 1 as is the default.

Erroneously removing Zettelkasten prefix

I have a problem with the plugin: I use Zettelkasten prefixes in first level headings, e.g. 202109161700 Heading title (same as file name). When acitvating the plugin it removes the prefix completely if I choose not to number the first level (plugin settings). IMHO this is a bug. At the moment I unfortunately can’t use the plugin this way. Is there a possibility to fix that bug?

Table of Contents anchor

Nice feature!

If one has added a ToC that way (i.e. # Header^toc) and one wants to get rid of the ToC later on, removing ^toc has no effect, one has to remove the ToC manually.

Is there a way to do it automatically after removing ^toc?

Linking to other notes from Table of Contents

I really like the table of contents function. Is there a way to be able to link to other notes with the same name as the TOC entry?

So, for example I give a heading the title "1 Introduction". In order to link this heading to another note with that same name I put the [[ ]] around it. This works for the heading itself, but not the actual TOC, where it turns into this

[[#1 [[1 Introduction|Introduction]]|1 [[1 Introduction|Introduction]]]]

or in Preview mode it becomes this:
[[#1 Introduction|1 Introduction]]

Any way to have JUST the name of the note show up?

Thanks :)

speed up the auto numbering

I noticed that there is a noticeable delay (about 1 second more or less) between typing a heading and seeing it numbered by the plugin. This affects my writing flow and makes me feel laggy. I wonder if there is a way to speed up the auto numbering process or reduce the delay time. Thank you for your great work on this plugin!

Plug-in obstructs Cmd+Z (undo)

I am on a Mac and have noticed that when the plug-in is enabled I am not longer able to do Cmd+Z (undo), a keyboard shortcut that I use frequently.

What happens is that when it is enabled I can make 3 keystrokes, e.g. aaa, and Cmd+Z will undo all 3 in 1 go.

If I do aaaa Cmd+Z does not undo anything, and instead jumps to a different location on the page. When I scroll back to where I came from, sure enough aaaa is still there.

Double trouble ... with 2 toc instead of 1

Any idea why the table of contents doubles?

image

These are my settings:

image

Here is the complete file content:


aliases: [Icons]
tags: [Icon, Folder, File]
Dateiname: Plugin supercharged links.md
filename: Plugin supercharged links
filenamemd: IT Grundlagen/MD Anleitungen/Obsidian Tricks/Obsidian plugins/supercharged links/Plugin supercharged links.md
filenamemd2: P:\Obsidian/IT Grundlagen/MD Anleitungen/Obsidian Tricks/Obsidian plugins/supercharged links/Plugin supercharged links.md
template: [TEMPLATE Neue Notiz]
number headings: first-level 2, max 6, 1.1, auto, contents ^toc
erstellt: Samstag, 28. Januar 2023, 18:20:33 Uhr
geändert: Samstag, 28. Januar 2023, 18:29:13 Uhr

Plugin supercharged links

Links

  • [[#Plugin supercharged links|Plugin supercharged links]]
  • [[#Inhaltsverzeichnis ^toc|Inhaltsverzeichnis]]
    • [[#1 Einstellungen|1 Einstellungen]]

Inhaltsverzeichnis ^toc

  • [[#Plugin supercharged links|Plugin supercharged links]]
  • [[#Inhaltsverzeichnis ^toc|Inhaltsverzeichnis]]
    • [[#1 Einstellungen|1 Einstellungen]]

1 Einstellungen

![[2023-01-28-superchared-links-settings.png|900]]

Numbers not part of the note

When I have a note with headers, then your plug-in adds numbers to those headers. Numbered headers are useful for navigation in long notes.

However, when e.g. a new header is inserted, the numbers in that note change, and all the links to those headers break.

Typora provides virtual heading numbering with some CSS code, and the numbering is NOT part of the note. Now, I asked about this a long time ago and someone (cannot remember who) explained that Typora and Obsidian have a different way of handling ………… uhm, something, so what Typora does is not possible in Obsidian. But with JavaScript a lot more is possible.

Is there a way for your plug-in to provide numbers as virtual numbers, i.e. not make them part of the note?

Skip headers for numbering

Thank you for providing such a useful plugin.

I occasionally found a need to skip some header from being numbered.
For instance, I want to prevent the ## Contents ^toc from counted.

More generally, a command to prevent sections with custom suffix, e.g., # Uncounted ^exclude, to skip them would be useful.

FYI, LaTeX provides starred commands like \section* for such usage.

Remove numbering does not work

I accidentally had the wrong settings in the front matter, so had some headings with odd numbers like A.1.

When I tried to remove them all with the command in the pallet nothing is removed.
I would have thought that reissuing the numbering command, even if the old numbers are not removed, would overwrite the old numbers - that is how it was in 1.0.1. But that is not the case here.

Reset number when

Love your plugin but there is a snag....

When the option 'Skip top heading level' is active. The behaviour is a bit unexpected. I would expect the follow heading (##) to start at 1 every time there is a new heading 1 (#). E.g. now numbering results in this:

# Heading 1
## 1 Heading 2
### 1.1 Heading 3
### 1.2 Heading 3
## 2 Heading 2
### 2.1 Heading 3
### 2.2 Heading 3
## 3 Heading 2
### 3.1 Heading 3
### 3.2 Heading 3

# Heading 1
## 4 Heading 2
### 4.1 Heading 3
### 4.2 Heading 3
## 5 Heading 2
### 5.1 Heading 3
### 5.2 Heading 3

while I would expect this:

# Heading 1
## 1 Heading 2
### 1.1 Heading 3
### 1.2 Heading 3
## 2 Heading 2
### 2.1 Heading 3
### 2.2 Heading 3
## 3 Heading 2
### 3.1 Heading 3
### 3.2 Heading 3

# Heading 1
## 1 Heading 2
### 1.1 Heading 3
### 1.2 Heading 3
## 2 Heading 2
### 2.1 Heading 3
### 2.2 Heading 3

Am I missing something? Maybe add an option 'Reset counter after every top heading"?

[Feature request] Add the frontmatter-like global field to settings

The problem

  1. All the settings are scattered around with slides, fields, toggles. There is no way to see everything at once.
  2. Not possible to copy&paste settings in one go to/from frontmatter and to/from friends and internet.
  3. Most importantly: the graphical settings do not give access to the whole variety of settings options available via frontmatter. E.g. having the dot after the last number. No matter what I try, the numbering settings are always going to be number headings: first-level 1, max 4, _.1.1, while I need number headings: first-level 1, max 4, _.1.1.. Once you know it, it's easy to change it in the frontmatter for one local file. But this setting is impossible to set up globally, to use as default when commanding to create the numbering for the active file, or to be used automatically if the automatic numbering toggle is on.

The solution

Make a new frontmatter-like global setting field that would overwrite the rest of the graphical settings, that can be copied from and pasted into.

Separator Style Bug with Whitespace

Hi!!

First of all just to want to say a big THANK YOU for developing this plugin! It really helped me a lot and I love it so much.

One small minor bug: in the setting => Separator Style, I found when you add a space before your separator like - instead of doing -, the auto numbering will keep adding separators.

See screenshot:
image

To reproduce the bug shown above:

  1. Go on Obsidian and create a new note
  2. Turn on auto numbering and set Separator style to - (i.e. whitespace + dash)
  3. Add some headings

It might be worth to fix (not a priority). I personally find that using - (whitespace + dash) as separator makes things easier to read than using - only (e.g. 1.2 - My heading vs. 1.2- My heading)

Linkage between pages will broken when automatic numbering

When we enable automatic numbering, it will break the linkage and shows "unable to find section". Could this plugin update the linkage automatically as well?

e.g. We have two pages:
Page A.md

1. Heading

2. Heading2

Page B.md
[[Page A^2. Heading2]

After inserting another heading before "2. Heading2". The link in Page B will show the error message.
Page A.md

1. Heading

2. Heading (new)

3. Heading2

Table of Contents doesn’t skip ignored heading level

Description

I have this in my front matter

number headings: first-level 3, max 6, A.1., contents ^toc

But the table of contents generated isn’t ignoring the first two levels of headings.

Expected Result

Table of contents starts at H3 / whatever the first level is.

Suggestion: Recognize dataviews `=this.file.name`

Thank you for your plugin.

I use =this.file.name from dataview for a heading. Is it possible, that your plugin recognizes it?

image

image

Inhaltsverzeichnis = table of contents
"Symbole Pfeil" is a headline
"Funktioniert" is a subheadline

[Suggestion] A simpler solution with css-counters

/** Numbered Headings **/
.cm-content { counter-reset: h1counter h2counter h3counter h4counter h5counter h6counter; }

.HyperMD-header-1 { counter-reset: h2counter; }
.HyperMD-header-2 { counter-reset: h3counter; }
.HyperMD-header-3 { counter-reset: h4counter; }
.HyperMD-header-4 { counter-reset: h5counter; }
.HyperMD-header-5 { counter-reset: h6counter; }


.HyperMD-header-1::before {
counter-increment: h1counter;
content: counter(h1counter) ".\0000a0\0000a0";
}

.HyperMD-header-2:before {
    counter-increment: h2counter;
    content: counter(h1counter) "." counter(h2counter) ".\0000a0\0000a0";
}
.HyperMD-header-3:before {
    counter-increment: h3counter;
    content: counter(h1counter) "." counter(h2counter) "." counter(h3counter) ".\0000a0\0000a0";
}

.HyperMD-header-4:before {
    counter-increment: h4counter;
    content: counter(h1counter) "." counter(h2counter) "." counter(h3counter) "." counter(h4counter) ".\0000a0\0000a0";
}

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

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

preview :
Screenshot 2023-06-13 at 4 19 44 AM

Mannully set the number of the first level heading, and automatically number other headings accordingly

Is it possible to manually set the number of the first level heading, and automatically number other headings accordingly?

For example, I have a document, which is the Third Chapter of a book. Therefore, I'd like to set the first-level heading (which is the Chapter title) to 3, and then the later level 2 heading could be automatically numbered as 3.1, 3.2, ..., and so on.

3 Chapter Title

3.1 Section 1

3.1.1 subsection 1

3.2 Section 2

3.2.1 subsection 1

Version 1.3.0 does not automatically renumber

I don't know if we mean the same thing when we talk about automatic renumbering.

If I have header A numbered as 1 and I have header B numbered as 2, and I insert a new header between A and B, then it should automatically number the new header as 2 and header B as 3.

That is how I understand it. Right now I still need to press my hotkey to get the numbers reset.

[Help Request] Using Headings "###"

Hello @onlyafly !!!!!

I'd like to ask your help with one specific workflow that I'm trying to implement with your amazing plug-in:

Here is my situation:

1- I have a note that only have level 3 headings ###

Here is my "raw" note:

Screen Shot 2021-10-11 at 07 39 43

Here is the resut that I want to achieve:

Screen Shot 2021-10-11 at 07 39 58

As you can see, i just wanna apply 1 2 and 3 with a level 3 headers. :)

I tried these settings to try to achieve this:

Attempt 1:

Screen Shot 2021-10-11 at 07 29 04
Screen Shot 2021-10-11 at 07 29 43

Attempt 2:

Screen Shot 2021-10-11 at 07 30 36
Screen Shot 2021-10-11 at 07 30 05

Attempt 3:

Screen Shot 2021-10-11 at 07 32 08
Screen Shot 2021-10-11 at 07 32 46

Here is my Settings Pane
Screen Shot 2021-10-11 at 07 36 12

Could you help me to get the right setting to achieve this? :)


Thanks for your help!

Have a great day!!!

Incorrect numbering for nested headings when top-level heading is unnumbered

Problem Description

I am unsure whether this is intended behaviour or a bug. I would like the top level not to be numbered but to have the lower level headings be numbered as if the top level heading was numbered.

Expectations

# heading 1

## 1.1 Contents ^toc

- [[#heading 1|heading 1]]
	- [[#1.1 Contents ^toc|1.1 Contents]]
- [[#heading 2|heading 2]]
	- [[#2.1 sub 1|2.1 sub 1]]
		- [[#2.1.1 sub 2|2.1.1 sub 2]]

# heading 2

## 2.1. sub 1

### 2.1.1. sub 2

Actual Result

# heading 1

## 1. Contents ^toc

- [[#heading 1|heading 1]]
	- [[#1. Contents ^toc|1. Contents]]
- [[#heading 2|heading 2]]
	- [[#1. sub 1|1. sub 1]]
		- [[#1.1. sub 2|1.1. sub 2]]

# heading 2

## 1. sub 1

### 1.1. sub 2

Settings Used

  • No frontmatter was set

image

Other settings I tried to get the desired result

  • Combinations of,

image

And

image

Version Information

  • OS: Pop!_OS 22.04 LTS x86_64
  • Obsidian version: v1.1.16
  • Plugin version: 1.13.0

Could I buy you a coffee, please

I love this plugin. It helps me adding chapter numbers to my books chapter. But when I need to get it in the publisher's WORD format, I can just remove them. Top notch!
Is there a way to provide some micro-support for you?

[Feature Request] New Command: `Number all Headings in the document using front matter settings`

Hello @onlyafly !!!!!

My workflow

I have a note only with tweets that I regularly export from twitter to obsidian

  • I use a Shortcut to export from iOS to Obsidian.

To make my note easy to search I have one header for each tweet:

Screen Shot 2021-10-11 at 07 52 58

After exportation I use your plug-in to create a numbered headings to my note

Screen Shot 2021-10-11 at 07 51 35

Since I import new tweets for this note everyday, I have to apply my front-matter settings Number all Headings in the document once a day to add new numbers to my list

Screen Shot 2021-10-11 at 08 03 37

Every time I got this notification message when I use : Number all Headings in the document

Screen Shot 2021-10-11 at 07 30 05

My Feature Request

I wanna request a new command to be used when you just need to update your note with the parameters previously defined in the front matter:

Number all Headings in the document using front matter settings

In my case, I already now my settings. I just want to update my note because of my new headers.

This way, I don't need to interact with the notification message box, I just need to apply the settings in the front-matter and continue to work :)

Why I don't use Automatic Numbering ?

Since I have a lot of notes from books with huge TOC that uses Humber Headings, I don't want to automatic numbering everything in my vault. I don't want to have a service running in all my notes trying to look for an update. I rather two this manually

  • I think Automatic Numbering is a great feature, but I rather do this manually :)

Thanks for your help.

Have a great day

Allow Numbering Prefix

My use case are legal documents.

For example:

# § 1 Heading
## § 1.1 ...

So basically I want to prepend a § to all headings.

Couple of remarks

  1. I have a note in which the heading numbers with version pre-1.4 (I think). I could not link to them from another note. I had to remove the numbers and let the latest version reinsert them to get the linking to work. I may well have more notes than that, but now I know what to.

  2. When you want to remove the heading numbers in a note, the note has to be in Edit mode. That also applies to adding heading numbers. Neither action will work in Preview mode. Perhaps it is obvious to others, to me it was not.

Update the reference to the heading

I have a lot of wiki links to headings. After I updated the heading numbers with this plugin, the links break.

Is it possible to update all the references when updating the heading numbers. Just like the official obsidian context menu item "rename this heading".

header-numbering-skip-top-level: false

I assume that this setting at “false” means that h1 headers WILL be counted. If I am right, then it does not work.

Note: the 1st time I used 1.4.0 and got the dialogue box with the question if I wanted to save those settings to the note's front matter I clicked on “yes”. In that dialogue the setting was set to “true”.

So, perhaps it has something to do with a cache? If so, please advise.
If cache clearance is an issue, it should be done automatically by the plug-in, right?

Edit: I went to ~/Library/Application Support/obsidian/Cache, deleted everything in there, refreshed, deleted numbers from headers, and tried again: no change.

BTW, after removing the numbers, then refreshing Obsidian, puts the numbers back. Cache issue.

Heading title changes ➙ links broken

If a heading title, which one has linked to, is changed, the link is broken.

In principle, this can be avoided by manually using the right-click submenu item Rename this heading.
However, if a heading is added to or deleted from a note, the plug-in automatically changes all the heading numbers in the note, bypassing the right-click method, of course.

So, pretty soon one ends up with many broken links throughout the vault.

I have some problem with internal link.

I have an internal link [[#my_heading]]. If I number all headings in a document, "my_heading" will turn to "1 my_heading". Then the internal link will not work. Is there any way to show the head number just in preview mode not in the editor mode?

Multiple Digits

Is it possible to use multiple digits in each heading level as a format, e.g. 01, 002, 103, etc.?

Numbering stops at 39

I have a note with perhaps 50 headers (I have not counted them), but when I activate the plug-in to add numbers, it stops at 39. Could this be fixed?

"Table of Contents Anchor" causes Obsidian to get stuck

If there are no other headings under the heading "^toc", Obsidian will get stuck after one second and no clicking, typing or other arbitrary actions will be possible. You can only force close Obsidian and delete "^toc" immediately within one second of opening to avoid the next stuck.

image

image

Not all the settings are transferred into frontmatter and are applied

My settings:
image
What is being transferred to frontmatter:
image
image

The verdict about the bug

The following settings are not being transferred:

  • the first heading level. Always shows 1.
  • separator style. Always a dot.
  • ToC anchor. Always missing.

System

  • Linux Mint 20.2 Cinnamon
  • Obsidian 0.12.19
  • the latest plugin 1.8.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.