Do you really want to toggle, like seeing section numbers on working days and not seeing them in the weekends? If you want to make a once-only decision per note, you can easily do it with a class reference in the note you want to decorate with numbers.
Here's my experiment. I conceived a class n- and applied it this way in the style definitions:
(I excluded the H1 level from being numbered, as I use that one as the title of the note.)
My note looks like this:
Numbered headers
================
<div class="n-">
## Level Two
### Level Three
### Nivo Trije
#### Level Four
##### Level Five
###### Level Six
Hello, world!
## Nivo Twa
### Niveau Drie
Hallo, wrâld!
# Nûmere kopteksten
## Niveau Twee
###### Nivo seis
Hallo, wereld!
## Ebene Zwei
###### Niveau Zes
Hallo, welt!
###### Vlak Ses
Hallo, wêreld!
</div>
###### Niveau Six
You can even decide within the note which parts have to be numbered and which parts not (I left "Niveau Six" at the bottom out).
Haha, good one. No, but rather depending on the note. So your approach is a great workaround. Thank you. However, I'd rather use the opposite direction (turning off, instead of turning on).
Can you copy my MD to a new note and see if you get the same (no)numbering as in my snapshot? If you have already some (no)numbering CSS in userstyle.css, you should comment that out to avoid interference (or simply temporarily rename userstyle.css).
Nope, unfortunaetly not (I renamed my userstyle.css). The strange thing is that I get numbering with your code. All my other notes don’t have numbering (since I renamed my userstyle.css):
I’m puzzled as well. At my side none of the H2…H6 headers are numbered except for the last one, ###### Niveau Six. Both on Windows and macOS, even with userstyle.css renamed. Is the last section ###### Niveau Six at your side numbered?
In fact, my CSS does not switch the numbering for H2…H6 off. It just makes it invisible by the content: none; property. You could try if content: ""; helps (gives the same result at my side). And otherwise you could move the block
What if you put the entire <style> block on top of the note?
Edit:
If that does not help (I’m curious if you still see some sharp angle anywhere), add some whitespace between the <style> tags and the content of the CSS block.
In case of failure again, I’m running out of ideas for Joplin. We could try to find a common ground outside Joplin, by trying this HTML file in your browser:
You should. I've added a link to this comment on gh. Things like that should be disseminated.
Btw, a link to the commonmark demo/live editor would be great.
Oh,that was simple (not overcoming my shyness , but finding the test page). I just clicked on one of the Try It buttons on the specs page. But this is the main entrance.