I have a page with sub pages. I made h1,h2,h3 tags on pages and I would like to add numbers to headers with levels. For example 1.1.1 for h3 tag.
      I made a stylesheet fo pdf export (below).

      When I export the main page with subpages the numbering works correctly on the main page but on subpages numbering starts from zero. (In the TOC numbering works correctly).I think export funkction restart the counter on every sub page.

      Here is an example tree of my pages and current numbering:

      1. Main page
      1.1 H1 tag
      1.2 H1 tag
      1.2.1 H2 tag
      1.2.2 H2 tag
      1.3 H1 tag
      1 Sub page 1
      0.1 H1 tag
      0.2 H1 tag
      0.2.1 h2 tag
      0.2.2 h2 tag
      0.3 H1 tag

      I would like this one:

      1. Main page
      1.1 H1 tag
      1.2 H1 tag
      1.2.1 H2 tag
      1.2.2 H2 tag
      1.3 H1 tag
      2 Sub page 1
      2.1 H1 tag
      2.2 H1 tag
      2.2.1 h2 tag
      2.2.2 h2 tag
      2.3 H1 tag

      How can I generate correct numbering which isn't restart on every subpage?

      Regareds, Peter

      Stylesheet:
      <code>
      @page

      { /*The A4 paper size is 210 mm wide by 297 mm high*/ size: 210mm 297mm; margin-top: 25.0mm; margin-bottom: 12.5mm; margin-left: 25mm; margin-right: 25mm; font-family: ConfluenceInstalledFont, Arial, Verdana, sans-serif; font-size: 12pt; }

      .doctitle

      { float: right; botttom: 0px; /*page: title;*/ }

      .doctitle-image

      { position: absolute; right: 0px; bottom: 0px; page-break-after: always; }

      .fsTitlePage

      { counter-reset: chapter; /* Create a chapter counter scope */ }

      #pageNum:before

      { content: counter(page) ". oldal, összesen " counter(pages);; font-family: ConfluenceInstalledFont, Arial, Verdana, sans-serif; font-size: 9pt; }

      #pageNum

      { width: 160mm; height: 15mm; text-align: center; vertical-align: middle; border-top-style: solid; border-top-width: 1px; border-top-color: #000000; }

      h1

      { counter-reset: sectionh2 sectionh3 sectionh4 sectionh5 sectionh6; }

      h2

      { counter-reset: sectionh3 sectionh4 sectionh5 sectionh6 ; }

      h3

      { counter-reset: sectionh4 sectionh5 sectionh6; }

      h4

      { counter-reset: sectionh5 sectionh6 ; }

      h5

      { counter-reset: sectionh6; }

      h1:before

      { counter-increment: sectionh1; }

      h2:before

      { content: counter(sectionh2) ". "; counter-increment: sectionh2; }

      h3:before

      { content: counter(sectionh2) "." counter(sectionh3) ". "; counter-increment: sectionh3; }

      h4:before

      { content: counter(sectionh2) "." counter(sectionh3) "." counter(sectionh4) "."; counter-increment: sectionh4; }

      h5:before

      { content: counter(sectionh2) "." counter(sectionh3) "." counter(sectionh4) "." counter(sectionh5) ". "; counter-increment: sectionh5; }

      </code>

              pgisbey Patrick Gisbey
              ae7f03f6d1b3 Peter Kepes
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: