Specially number appendices

This commit is contained in:
Tony Garnock-Jones 2018-09-24 19:12:29 +01:00
parent 1d48216700
commit accaa03f5c
1 changed files with 15 additions and 2 deletions

View File

@ -6,7 +6,7 @@ body {
hr { display: none; }
}
@media print {
@page { margin: 4rem 0rem 4.333rem 0rem; }
@page { size: letter; margin: 4rem 0rem 4.333rem 0rem; }
body { margin-left: 4.5rem; margin-right: 4.5rem; }
h1, h2 { page-break-before: always; margin-top: 0; }
h1:first-of-type, h2:first-of-type { page-break-before: auto; }
@ -20,7 +20,7 @@ code { font-size: 75%; }
pre { padding: 0.33rem; }
body {
counter-reset: section 0 subsection 0;
counter-reset: section 0 subsection 0 appendix 0;
}
h2:before, h3:before {
text-align: right;
@ -44,3 +44,16 @@ h3:before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) ". ";
}
h2[id^="appendix-"]:before {
counter-increment: appendix;
content: counter(appendix,upper-latin) ". ";
}
h2[id^="appendix-"] ~ h3:before {
counter-increment: subsection;
content: counter(appendix,upper-latin) "." counter(subsection) ". ";
}
h2#notes:before {
display: none;
}