Numbered headers and page table of content

Use it with the usual headers !, !!, !!! -> !!!!!!

To have text indented following the header level, set the directive (:indent:) before the first header. The indentation is based upon the first header seen after the directive. Anything below that level will show strange results :

(:indent:)
!Header
!!Subheader
!!!`SubSubheader
!Another Header
!!Subheader
(:noindent:)
Text not indented

(:indent:)

Header

Subheader

SubSubheader

Another Header

Subheader

(:noindent:) Text not indented

To have numbered headers, set the directive (:num:) and the headers will be numbered after the directive setting. (:nonum:) stops the numbering, but do not reset it. The numbering starts from the first header level seen:

!!general header (not numbered)
(:num:)
!!Header numbered
!!!Subheader numbered
!!!Subheader...
!!Another Header
!!!Subheader
(:nonum:)
!!Header not numbered (Annex..)
!!Header not numbered (Annex..)

general header (not numbered)

(:num:)

Header numbered

Subheader numbered

Subheader...

Another Header

Subheader

(:nonum:)

Header not numbered (Annex..)

Header not numbered (Annex..)

And finally, to have a page table of content, set the directive (:toc:)

!general header - not in toc
(:num:)
(:toc:)
!!Header
!!!Subheader
!!!Subheader
!!Another Header
!!!Subheader
(:notoc:)
!!Another Header - not in toc
!!!Subheader - not in toc

general header - not in toc

(:num:)

Header

Subheader

Subheader

Another Header

Subheader

Another Header - not in toc

Subheader - not in toc

directive (:notoc:) stops the table of content recording, but only one table of content can exist in a page.

There is a maximum of 4 levels.

This page may have a more recent version on pmwiki.org: PmWiki:NumberedHeaders, and a talk page: PmWiki:NumberedHeaders-Talk.

Mekanismin wiki pyörii PmWikin päällä ulkoasunaan UnStrapped