This must be defined in the PDF export stylesheet with the help of CSS counters. A quick example would look like this:
body { counter-reset: levelA; } h2:before { content: counter(levelA) ". "; counter-increment: levelA; } h2 { counter-reset:levelB; } h3:before { content: counter(levelA) "." counter(levelB) ". "; counter-increment: levelB; }
This almost works, but still results in odd numbering. Thanks for the info though, this is a starting point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, this fails in situations where h1-h6 markings are also used on the pages itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If so, just exclude those headings and include the page title instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use .pagetitle h1 to only include the page title but not the page headings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a working example of plain html with levels of headings that get numbered (try here https://jsfiddle.net/gudj/37pcs28x/ )
body {counter-reset: lvl1;} .pagetitle>h1 {counter-reset: lvl2;} .pagetitle>h2 {counter-reset: lvl3;} .pagetitle>h3 {counter-reset: lvl4;} .pagetitle>h1 {counter-increment: lvl1;} .pagetitle>h2 {counter-increment: lvl2;} .pagetitle>h3 {counter-increment: lvl3;} .pagetitle>h4 {counter-increment: lvl4;} .pagetitle>h1:before {content: counter(lvl1) ". "} .pagetitle>h2:before {content: counter(lvl1) "." counter(lvl2) ". "} .pagetitle>h3:before { content: counter(lvl1) "." counter(lvl2) "." counter(lvl3) ". " } .pagetitle>h4:before { content: counter(lvl1) "." counter(lvl2) "." counter(lvl3) "." counter(lvl4) ". " }
But when I use that CSS in "pdf export CSS" I get a couple of problems: The counter increment only works on the h1 level. For the lower levels (h2-h4) there is only one increment so they all show "1" (unless the parent level is missing in which case it becomes "0"). This one is quite annoying since I know the header levels are there since the content gets inserted. Could this be caused by counter reset caused by additional h1 tags? But why would they be wrapped in pagetitle class if they are not themselves page titles?
The second problem is discussed above by Heller etc - but I am not able to use pagetitle to filter out the headings within each page, the class seems to get matched also for some "intra-page" headlines, not just the page title. I've tried using other classes/ids from the displayed HTML but it seems only pagetitle is used in the pdf export...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.