I came across an old discussion on automatic numbering of headings,
Vincent Massol offered this solution:
http://www.xwiki.org/xwiki/bin/view/FAQ/NumberedSections
A great feature, but I am a bit at loss how to implement this in XWiki
2.0 syntax.
{{velocity}}
#set ($context.tocNumbered = true)
#set ($context.tocData = $tdoc.getTOC(2, 6, true))
{{/velocity}}
==example header==
didn't do the trick.
Any hints?