/* 
Enumerate headings

Only displayed when set in mkdocs.yml

print-site:
    - print-site-enumerate_headings: true
*/

/* Reset all enumeration at start of page */
body {counter-reset: chapter sec-top toc-chapter toc-sec-chapter figurecounter;}

/* Enumerate headings of CHAPTERS,
that are part of an original included page */
.print-site-enumerate-headings .print-page h1 {counter-reset: section sub-section composite detail last; }
.print-site-enumerate-headings .print-page h2 {counter-reset: sub-section composite detail last; }
.print-site-enumerate-headings .print-page h3 {counter-reset: composite detail last; }
.print-site-enumerate-headings .print-page h4 {counter-reset: detail last; }
.print-site-enumerate-headings .print-page h5 {counter-reset: last; }
.print-site-enumerate-headings .print-page h1:before {
    counter-increment: chapter;
    content: counter(chapter) " " !important;
}
.print-site-enumerate-headings h1.print-page-toc-title:before,
#print-site-cover-page h1:before,
#print-site-cover-page h2:before,
#print-site-cover-page h3:before,
#print-site-cover-page h4:before,
#print-site-cover-page h5:before,
#print-site-cover-page h6:before {
    content: none !important;
    counter-increment: none;
}


/* Enumerate headings of SECTIONS,
that are part of an original included page */
.print-site-enumerate-headings h1 {counter-reset: sec-section sec-sub-section sec-composite sec-detail sec-last; }
.print-site-enumerate-headings h2.nav-section-title {counter-reset: sec-sub-section sec-composite sec-detail sec-last; }
.print-site-enumerate-headings h3.nav-section-title {counter-reset: sec-composite sec-detail sec-last; }
.print-site-enumerate-headings h4.nav-section-title {counter-reset: sec-detail sec-last; }
.print-site-enumerate-headings h5.nav-section-title {counter-reset: sec-last; }
.print-site-enumerate-headings h1.nav-section-title:before {
    counter-increment: sec-top;
    content: counter(sec-top, upper-roman) ". " !important;
}


/* Enumerate CHAPTERS in table of contents also */
.print-site-enumerate-headings .print-site-toc-level-1 > ul { counter-reset: toc-section; }
.print-site-enumerate-headings .print-site-toc-level-2 > ul { counter-reset: toc-sub-section; }
.print-site-enumerate-headings .print-site-toc-level-3 > ul { counter-reset: toc-composite; }
.print-site-enumerate-headings .print-site-toc-level-4 > ul { counter-reset: toc-detail; }
.print-site-enumerate-headings .print-site-toc-level-5 > ul { counter-reset: toc-last; }
.print-site-enumerate-headings .print-site-toc-level-1 > li a:before {
    counter-increment: toc-chapter;
    content: counter(toc-chapter) " "; 
}

/* Enumerate SECTIONS in table of contents also */
.print-site-enumerate-headings li.toc-nav-section-title-level-1 { counter-reset: toc-sec-section; }
.print-site-enumerate-headings li.toc-nav-section-title-level-2 { counter-reset: toc-sec-sub-section; }
.print-site-enumerate-headings li.toc-nav-section-title-level-3 { counter-reset: toc-sec-composite; }
.print-site-enumerate-headings li.toc-nav-section-title-level-4 { counter-reset: toc-sec-detail; }
.print-site-enumerate-headings li.toc-nav-section-title-level-5 { counter-reset: toc-sec-last; }
.print-site-enumerate-headings li.toc-nav-section-title-level-1:before {
    counter-increment: toc-sec-chapter;
    content: counter(toc-sec-chapter, upper-roman) " "; 
}


#print-page-toc li a.headerlink:before {
    content: none !important;
    counter-increment: none;
}
