I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Hierarcial Numbered headers

Added by Adnan Topçu over 2 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


Terms of use | Privacy policy