You are right, Philippe, sorry for my incorrect example. You have to use several lines:
<div class="nr"> ! Title h1 </div> 2016-09-22 22:00 GMT+02:00 Philippe Le Toquin <phili...@ppmt.org>: > 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 a topic in the > Google Groups "TiddlyWiki" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/tiddlywiki/1bnaQU3O3j0/unsubscribe. > To unsubscribe from this group and all its topics, 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 https://groups.google.com/d/ > msgid/tiddlywiki/a338b717-dea7-4f18-a30c-d68e8f4b5967%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/a338b717-dea7-4f18-a30c-d68e8f4b5967%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 https://groups.google.com/d/msgid/tiddlywiki/CALXLrTh06Fkx4n59MYMCUDXFor74KLP-Tj0eV9KA1ZgOsQOe5A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.