When using page-number-citation to build table of contents,
text-align="right"
 doesn't line up all the page numbers properly.

 At first I thought it was something wrong in fo:leader but changing to
 tables with border shows the problem is still there.

 Interestingly 0.20.5RC is less wrong than 0.20.4 - but it's still wrong.
 Is this a bug? or have I missed something?

--
Stuart McGrigor
Principal Consultant
Kintore Consulting Ltd.,
P O Box 81, Martinborough,
New Zealand


 <!-- XML -->

  <Document>
    <Chapter Name="Fixups"         id="Fixups"    href="Fixups.xml"/>
    <Chapter Name="Store Groups"   id="StrGrp"    href="StoreGroup.xml"/>
    <Chapter Name="Item"           id="Itm"       href="Item.xml"/>
    <Chapter Name="Item Sub-Types" id="ItmSType"  href="ItemSubTypes.xml"/>
    <Chapter Name="Rentals"        id="Rntl"      href="Rentals.xml"/>
    <Chapter Name="Sales Tax"      id="Tax"       href="SalesTax.xml"/>
  </Document>



   <!-- XSL  -->
   <xsl:template match="Chapter" mode="toc">
     <fo:block
       font-family="sans-serif"
       font-size="16pt"
       font-weight="bold">

       <fo:table table-layout="fixed" width="50%">
         <fo:table-column column-width="proportional-column-width(1)"/>
         <fo:table-column column-width="proportional-column-width(1)"/>
         <fo:table-body>
           <fo:table-row>
             <fo:table-cell>
               <fo:block text-align="justify" border="solid 1pt navy">
                 Chapter
                 <xsl:number format="1: " level="single" from="*"
count="Chapter"/>
                 <xsl:value-of select="@Name"/>
               </fo:block>
             </fo:table-cell>
             <fo:table-cell>
               <fo:block text-align="right" border="solid 1pt red">
                 <fo:page-number-citation ref-id="[EMAIL PROTECTED]"/>
               </fo:block>
             </fo:table-cell>
           </fo:table-row>
         </fo:table-body>
       </fo:table>
     </fo:block>
   </xsl:template>


  <!--  Expected Output -->
  +---------------------------+-----------+
  |Chapter 1:Fixups           |         3 |
  |Chapter 2:Store Groups     |         5 |
  |Chapter 3:Item             |         8 |
  |Chapter 4:Item Sub-Types   |         15|
  |Chapter 5:Rentals          |         23|
  |Chapter 6:Sales Tax        |         42|
  +---------------------------+-----------+


  <!--  OUTPUT  fop 0.20.4 -->
  +---------------------------+---------+
  |Chapter 1:Fixups           |         3
  |Chapter 2:Store Groups     |         5
  |Chapter 3:Item             |         8
  |Chapter 4:Item Sub-Types   |         15   Border line down the middle
  |Chapter 5:Rentals          |         23          of 1st digit
  |Chapter 6:Sales Tax        |         42               ...
  +---------------------------+---------+

  <!--  OUTPUT  fop 0.20.5rc-->
  +---------------------------+----------+
  |Chapter 1:Fixups           |         3|
  |Chapter 2:Store Groups     |         5|
  |Chapter 3:Item             |         8|
  |Chapter 4:Item Sub-Types   |         15   Border line down the middle
  |Chapter 5:Rentals          |         23          of 2nd digit
  |Chapter 6:Sales Tax        |         42               ...
  +---------------------------+----------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to