You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by St...@ubs.com on 2004/06/28 11:15:00 UTC
page citation alignment issue
Hi,
I am using the latest version of FOP and it still appears to have a page alignment problem. I have multiple page citations on the same line. For every citation the right alignment is affected by a small amount. See below XSL:
<fo:table-cell font-family="Arial" color="rgb(0%,0%,50.196%)" font-size="8">
<fo:block text-align="right" margin-right="0.02cm">
<xsl:for-each select="Value">
<xsl:if test="not($summary_type = 'none')">
<xsl:variable name="note_num" select="./@text"/>
<fo:page-number-citation>
<xsl:attribute name="ref-id"><xsl:value-of select="concat('link.note.' , $note_num)"/></xsl:attribute>
</fo:page-number-citation>
<xsl:choose>
<xsl:when test="position() mod 5 = 0 and position()!=last()">
<xsl:text>, </xsl:text>​</xsl:when>
<xsl:otherwise>
<xsl:if test="position()!=last()">
<fo:wrapper>
<xsl:text>, </xsl:text>
</fo:wrapper>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</fo:block>
<fo:table-cell>
gives the attached output:
any help appreciated
Re: page citation alignment issue
Posted by Chris Bowditch <bo...@hotmail.com>.
Stuart.Yoxall@ubs.com wrote:
> Hi,
>
> I am using the latest version of FOP and it still appears to have a page alignment problem. I have multiple page citations on the same line. For every citation the right alignment is affected by a small amount. See below XSL:
From your XSLT snippet provided, it looks like you are inserting non breaking
spaces after the page number citation, so this makes sense. Am I right in
thinking you are trying to split lists of page numbers into groups of 5 per
line? I think the problem is in your xsl logic. Make sure you dont insert a
nbsp after the 5th or last page-number-citation.
To confirm what is going on, use xalan.bat provided with the FOP distribution
to generate a intermediate XSL-FO file from your XML and XSL files. I think
you will be see nbsp characters after the page number citations.
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org