xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Leeds <cle...@medata.com>
Subject Re: page-number-citation and text-align="right"
Date Fri, 07 Feb 2003 23:01:07 GMT
I think this has been covered before. As I understand it, right-aligning 
page-number stuff is buggy. It has to do with somehow trying to figure 
out how many digits are _going_ to be in the page-number. Because of 
this, it doesn't work perfectly. As a workaround, I'd recommend placing 
some non-breaking space characters (&#160;) to the right of your 
page-number-citation(s)--perhaps just one (if that works) or one for 
each digit (if you need more).

Hope this helps!

Stuart McGrigor wrote:
>  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="{@id}"/>
>                </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: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org


-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message