Skip to main content
Inspiring
June 3, 2026
Answered

Remove leader and page number from chapter TOC

  • June 3, 2026
  • 5 replies
  • 31 views

RoboHelp 2026.03.13

I need to know how to remove the leader and page number from the Chapter TOC present on the Chapter_first page. I want to continue to have the name of the article, but I have not been able to find any place to remove the leader and page number.

I do not want to change the leader and page number from the main document TOC.

This is my chapter toc on the chapter_first page:

   <div data-type="chapter-toc" style="margin-top: 8pt;margin-bottom: 24pt">
<ol class="chaptoc-body" data-class="level2" data-from-selector="h2" data-selector="h2" data-to-selector="h2" data-type="chaptoc-body" style="">
<li><a class="chaptoc-level-2" href="#">Heading 2</a></li>
</ol>
</div>

This is the current entry in Layout.css:

.chaptoc-body {
font-family: 'Inter UI';
list-style-type: none;
padding-left: 0.25in;
margin-top: 8pt;
margin-bottom: 24pt;
font-weight: normal;
text-decoration: underline;
font-size: 11px;
color: #009BDE;
}
.chaptoc-level-2 {
font-size: 14pt;
text-decoration: none;
font-weight: normal;
text-decoration: underline;
color: #515784;
}
.toc-level-2::after {
content: leader(space) " " !important;
}

At the advice of various AIs (I tried 3 and they all agreed), they all suggested adding one of these blocks to my layout.css which actually prevents it from displaying anything in the Chapter TOC:

.chaptoc-body li::after,
.chaptoc-body a::after,
.chaptoc-level-2::after {
content: none !important;
display: none !important;
}

or:

.chaptoc-level-1::after,
.chaptoc-level-2::after,
.chaptoc-level-3::after,
.chaptoc-body li::after {
content: target-text(attr(href url)) !important;
}

I have removed those blocks as they were counter productive.

This how my output should look:

This is how it currently looks:

 

    Correct answer Eric J. Technical Writer

    I have found a solution for this. While I was targeting the ::after for chaptoc-level-2, I needed to target the content of chaptoc-body after.

    The correct code to add to my layout.css to remove the leader and the page number from the chapter TOCs is:
     

    .chaptoc-body a::after {
    content: target-text(-ro-attr(href url), content) !important;
    }

     

    5 replies

    Eric J. Technical WriterAuthorCorrect answer
    Inspiring
    June 9, 2026

    I have found a solution for this. While I was targeting the ::after for chaptoc-level-2, I needed to target the content of chaptoc-body after.

    The correct code to add to my layout.css to remove the leader and the page number from the chapter TOCs is:
     

    .chaptoc-body a::after {
    content: target-text(-ro-attr(href url), content) !important;
    }

     

    Peter Grainge
    Community Expert
    Community Expert
    June 9, 2026

    In a simple project I have just added a mini-toc in a chapter and it generates exactly how you have said you want it, no page numbers and no leader.

    It seems logical therefore that the changes AI has suggested are behind this. Let’s prove that.

    1. Create a new PDF template with no customisation.
    2. Create a new PDF preset, not a duplicate.
    3. Generate and tell us what you get then.

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Jeff_Coatsworth
    Community Expert
    Community Expert
    June 9, 2026

    Instead of using the generated Chapter TOC, what about creating your own topics with the links you want to appear?

    Inspiring
    June 9, 2026

    I could do that. But I want a template I can give all our writers and they build a TOC, then send it out. They don’t then have to go through and build any pages. Adobe can do it.

    Peter Grainge
    Community Expert
    Community Expert
    June 3, 2026

    I am guessing this is a Word output.

    I believe that can be done via the UI and I wouldn’t expect AI to get this right.

    See https://www.grainge.org/RoboHelp_Tour/rh2022/outputs/word_templates.htm

    I think this is where you need to be to edit the relevant template.


    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    June 9, 2026

    Unfortunately, this is not the answer. I am trying to do it on a PDF, but the PDF has the same screens mostly in regards to the TOC. The TOC settings in the template are for the main TOC and not the chapter TOC.

    The only UI interface for the Chapter TOC is in the Content Properties of the TOC entry:
     

    This is already set how I want it, but it does not give leader and page display settings.

    Jeff_Coatsworth
    Community Expert
    Community Expert
    June 3, 2026

    Are you creating this type of TOC manually or is the program generating it for you?

    Inspiring
    June 9, 2026

    By using the PDF template’s page Chapter_First, it is generating the Chapter TOC automatically.
    Template:
     

    The only UI settings for the Chapter TOC is under content properties of the TOC entry on this page: