Hierarcial Numbered headers
Added by Adnan Topçu over 10 years ago
This is related to #2392
name
headernumbers
Description
Hierarcial Header Numbering
Content
<style type="text/css">
h1 { counter-reset: h1s;
}
h2 { counter-reset: h2s; }
h2::before {
content: counter(h1s) ". ";
counter-increment: h1s;
}
h3 { counter-reset: h3s; }
h3::before {
content: counter(h1s) "." counter(h2s) ". ";
counter-increment: h2s;
}
h4 { counter-reset: h4s; }
h4::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) ". ";
counter-increment: h3s;
}
h5 { counter-reset: h5s; }
h5::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) "." counter(h4s) ". ";
counter-increment: h4s;
}
h6 { counter-reset: h6s; }
h6::before {
content: counter(h1s) "." counter(h2s) "." counter(h3s) "." counter(h4s) "." counter(h5s) ". ";
counter-increment: h5s;
}
</style>
Limitations
1. This macro must be call each page you want to use this feature. 2. h1. must be exist. 3. Supported up to h6.
Example
{{headernumbers}}
h1. Unnumbered Top Header (must be exist)
h2. First child topic
h3. Cild's child topic
h2. Second child topic