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 "Partridge, Michael" <mi...@ebenx.com> on 2003/06/06 18:55:32 UTC

lining up amounts w/ and w/o parentheses

My pdf is a bill which lists positive and negative amounts in a table,
and I need to use parentheses for the negative amounts. The problem is
that those w/ parentheses don't line up with the others - they're pushed
left (because everything is right-aligned). I've tried this:

<xsl:variable name="space" select="' '"/>
...
$<xsl:value-of select="current_am"/><xsl:value-of select="$space"/>
($<xsl:value-of select="paid_am"/>)
$<xsl:value-of select="total_am"/><xsl:value-of select="$space"/>

but to no avail. I've also tried using white-space-collapse="false" in
the enclosing <fo:block>, but it still seems to be lost as well as
causing problems due to stylesheet indenting. Has anyone else run into
this problem?

Mike

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


Re: lining up amounts w/ and w/o parentheses

Posted by Jeremias Maerki <de...@greenmail.ch>.
Another option is to disable kerning. This has helped me in the past.


Jeremias Maerki


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


Re: lining up amounts w/ and w/o parentheses

Posted by Clay Leeds <cl...@medata.com>.
Mike,

On 6/6/2003 9:55 AM, Partridge, Michael wrote:
> but to no avail. I've also tried using white-space-collapse="false" in
> the enclosing <fo:block>, but it still seems to be lost as well as
> causing problems due to stylesheet indenting. Has anyone else run into
> this problem?
> 
> Mike

In my experience, when I have weird alignment problems like this, I 
place the contents of the <fo:block> inside <fo:inline> and it helps:

<fo:block>
   <fo:inline>[Insert your value here]</fo:inline>
</fo:block>

Works for me...
-- 
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


Re: lining up amounts w/ and w/o parentheses

Posted by Clay Leeds <cl...@medata.com>.
On 6/7/2003 8:34 AM, Victor Mote wrote:
> What you really want here is to align on the decimal point, but according to
> http://xml.apache.org/fop/compliance.html#fo-property-text-align
> text-align=<string> is not yet supported. The best workaround that I can
> think of is to put your trailing ending parentheses into a separate table
> cell, which is aligned /left/.

You could also put parentheses around *everything* but make the 
parentheses for positive numbers the same color as your background-color 
(white if there is no background-color). Of course, it would get more 
challenging if you alternate the background-color of table-rows, but 
there are solutions to that as well. Unfortunately, the parentheses 
would be present in the PDF files if someone were to select and copy the 
text but if you're just "printing" you're OK.
-- 
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


RE: lining up amounts w/ and w/o parentheses

Posted by Victor Mote <vi...@outfitr.com>.
Partridge, Michael wrote:

> My pdf is a bill which lists positive and negative amounts in a table,
> and I need to use parentheses for the negative amounts. The problem is
> that those w/ parentheses don't line up with the others - they're pushed
> left (because everything is right-aligned). I've tried this:

What you really want here is to align on the decimal point, but according to
http://xml.apache.org/fop/compliance.html#fo-property-text-align
text-align=<string> is not yet supported. The best workaround that I can
think of is to put your trailing ending parentheses into a separate table
cell, which is aligned /left/.

Victor Mote


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


Re: White space problems with TXTRenderer

Posted by Jeremias Maerki <de...@greenmail.ch>.
The TXT renderer is certainly not FOP's most sophisticated renderer and,
unfortunately, its developer is no longer active. Please read about the
text renderer here: http://xml.apache.org/fop/output.html#txt

I know there have been similar questions in the past. So please search
through the mailing list archives. I'm pretty sure you'll find some
useful information. Good luck.

On 07.06.2003 09:21:58 Mukul wrote:
> Hello ,
> I am using FOP 0.20.4 to produce TXT file from XML i/p
> document. By the posts I have read about FOP
> TXTRenderer, it seems it does not generate production
> quality TXT o/p.
> 
> for e.g. when I write in XSL-FO as
> <fo:block>
> <!--some text..	-->
> </fo:block>
> 
> the TXT o/p generate extra spaces. The TXT o/p is also
> not consistent. For e.g. if my XML has many
> records(tags) , sometimes white spaces problems comes
> in for e.g. 8th record , sometimes white space problem
> comes in some other record.
> 
> Is there a way to control the o/p behaviour
> predictably? I want that the TXT o/p should appear as
> equal to a PDF o/p. Ideally the same stylesheet must
> produce identical PDF and TXT o/p s. Is it possible! 



Jeremias Maerki


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


White space problems with TXTRenderer

Posted by Mukul <mu...@yahoo.com>.
Hello ,
I am using FOP 0.20.4 to produce TXT file from XML i/p
document. By the posts I have read about FOP
TXTRenderer, it seems it does not generate production
quality TXT o/p.

for e.g. when I write in XSL-FO as
<fo:block>
<!--some text..	-->
</fo:block>

the TXT o/p generate extra spaces. The TXT o/p is also
not consistent. For e.g. if my XML has many
records(tags) , sometimes white spaces problems comes
in for e.g. 8th record , sometimes white space problem
comes in some other record.

Is there a way to control the o/p behaviour
predictably? I want that the TXT o/p should appear as
equal to a PDF o/p. Ideally the same stylesheet must
produce identical PDF and TXT o/p s. Is it possible! 

Regards,
Mukul



__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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