I tried your variant Thomas but I am not sure I understand how to use the 
div in the tiddler.

if I use <div class="nr"> !Title </div> in my tiddler then it gets rendered 
simply as : !Title 
it seems to loose the knowledge it is supposed to be a header.

On Thursday, 22 September 2016 20:42:30 UTC+1, Thomas Elmiger wrote:
> Very interesting! Here is my variant. I added a class, so titles are only 
> numbered when inside an element with class="nr" (e.g. <div class="nr"> 
> !Title </div>). This does not affect other tiddlers, they keep standard 
> titles. And I made some similar corrections like Philippe mentioned before, 
> I guess.
> Thanks a lot and happy numbering!
> Thomas
> div.tc-tiddler-body .nr, div.tc-tiddler-preview-preview .nr {
>    counter-reset: h1counter;
> }
> div.tc-tiddler-body .nr h1, div.tc-tiddler-preview-preview .nr h1 {
>    counter-increment: h1counter;
>    counter-reset: h2counter;
> }
> div.tc-tiddler-body .nr h2, div.tc-tiddler-preview-preview .nr h2 {
>    counter-increment: h2counter;
>    counter-reset: h3counter;
> }
> div.tc-tiddler-body .nr h1::before, div.tc-tiddler-preview-preview .nr h1
> ::before {
>    content: counter(h1counter) ".\0000a0\0000a0";
> }
> div.tc-tiddler-body .nr h2::before, div.tc-tiddler-preview-preview .nr h2
> ::before {
>    content: counter(h1counter)"."counter(h2counter) ".\0000a0\0000a0";
> }
> div.tc-tiddler-body .nr h3::before, div.tc-tiddler-preview-preview .nr h3
> ::before {
>    content: counter(h1counter)"."counter(h2counter) "." counter(h3counter) 
> ".\0000a0\0000a0";
>    counter-increment: h3counter;
> }

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to