I have a table of contents that should be displayed as below (this was the output I had using Antenna House (trial version) 6.3.

Previous output

(The page numbers should start a set distance from the left hand side of the page.)

Having recently upgraded to AH 6.6 the output is now incorrect; during formatting I get:

Formatting

Then finally:

New output

(Sorry about the bold text)

It seems that the initial 0's change the alignment. The TOC is part of the introduction page, which I think is the reason for it not having the 0's to begin with.

The code I currently have for this is:

li[class*='tab-']{
    width: attr(data-tab);
}
li[class*='tab-']::before{
    padding-left: calc(1em * attr(data-cptlv));
}
li[class*='tab-']::after{
    content: '(' attr(data-dict-pgct) ' ' target-counter(attr(data-ref),page) ')';      
    float: right;
}

For this TOC the attributes data-tab and data-dict-page are the same for all list items (40% and 'page' repectively). See HTML below:

<p class="">For this document the simplified Table of Contents looks like this:</p>
<ul class="tab-40">
  <li class="tab-40" data-cptlv="1" data-chptno="1" data-dict-pgct="page"
      data-xmlno="X00355088"
      data-ref="#X00355088"
      data-tab="40%">
     <a href="#X00355088" class="tab-40" title="Introduction"/>
  </li>
  <li class="tab-40" data-cptlv="1" data-chptno="2" data-dict-pgct="page"
      data-xmlno="X00355092"
      data-ref="#X00355092"
      data-tab="40%">
     <a href="#X00355092" class="tab-40" title="Preparation"/>
  </li>
  <li class="tab-40" data-cptlv="1" data-chptno="3" data-dict-pgct="page"
      data-xmlno="X00355111"
      data-ref="#X00355111"
      data-tab="40%">
     <a href="#X00355111" class="tab-40" title="Tasks"/>
  </li>
  <li class="tab-40" data-cptlv="1" data-chptno="4" data-dict-pgct="page"
      data-xmlno="X00355100"
      data-ref="#X00355100"
      data-tab="40%">
     <a href="#X00355100" class="tab-40" title="Finalization"/>
  </li>
  <li class="tab-40" data-cptlv="1" data-chptno="5" data-dict-pgct="page"
      data-xmlno="X00355103"
      data-ref="#X00355103"
      data-tab="40%">
     <a href="#X00355103" class="tab-40" title="Reference documents"/>
  </li>
  <li class="tab-40" data-cptlv="1" data-chptno="6" data-dict-pgct="page"
      data-xmlno="X00355389"
      data-ref="#X00355389"
      data-tab="40%">
     <a href="#X00355389" class="tab-40" title="Table of Contents"/>
  </li>

How can I get around this?

0 Answers