Skip to main content
Inspiring
February 17, 2023
Question

RH2022 PDF output TOC numbering does not equal topic heading numbering

  • February 17, 2023
  • 1 reply
  • 258 views

(RoboHelp 2022.0.346)

Hello

I use following code to number the headings and this works perfect.

@media print
body {counter-reset: h1cntr 0}
  h1 {counter-reset: h2cntr}
  h2 {counter-reset: h3cntr}
  h3 {counter-reset: h4cntr}
  h4 {counter-reset: h5cntr}

  h1:before {counter-increment: h1cntr; content: counter(h1cntr) ". "}
  h2:before {counter-increment: h2cntr; content: counter(h1cntr) "." counter(h2cntr) " "}
  h3:before {counter-increment: h3cntr; content: counter(h1cntr) "." counter(h2cntr) "." counter(h3cntr) " "}
  h4:before {counter-increment: h4cntr; content: counter(h1cntr) "." counter(h2cntr) "." counter(h3cntr) "." counter(h4cntr) " "}
  h5:before {counter-increment: h5cntr; content: counter(h1cntr) "." counter(h2cntr) "." counter(h3cntr) "." counter(h4cntr) "." counter(h5cntr) " "}

The result is for example:

1. Topic 1, Heading 1

2. Topic 2, Heading 1

2.1 Topic 2, Heading 2

2.2 Topic 2, Heading 2

3. Section, Title

3.1 Topic 2, Heading 1

3.1.1 Topic 2, Heading 2

3.1.2 Topic 2, Heading 2

3.2 Topic 3, Heading 1

3.2.1 Topic 2, Heading 2

3.2.2 Topic 2, Heading 2

 

The TOC however shows the following (I underlined and bolded the errors):

1. Topic 1, Heading 1

2. Topic 2, Heading 1

2.1 Topic 2, Heading 2

2.1 Topic 2, Heading 2

3. Section, Title

3.1 Topic 2, Heading 1

3.1.1 Topic 2, Heading 2

3.1.1 Topic 2, Heading 2

3.1 Topic 3, Heading 1

3.2.1 Topic 2, Heading 2

3.2.1 Topic 2, Heading 2

 

Can this be solved via CSS code?

Or is it a bug?

 

Thanks in advance

    This topic has been closed for replies.

    1 reply

    Jeff_Coatsworth
    Community Expert
    Community Expert
    February 17, 2023
    D.DesmetAuthor
    Inspiring
    February 17, 2023

    No, I didn't. It is indeed the same issue. I am following it now hoping to see a solution soon. Thank you.