On Oct 29, 2007, at 07:22, Manuel Mall wrote:

Hi

Just to confirm:

When I use FOP 0.96, however, the tag causes my java source code to appear filled and wrapped? Am I doing something wrong or is there a problem with
0.96?

I am not sure I understand what you mean by "filled". However, the handling
of white space has changed significantly between 0.20.5 and 0.96. 0.96
behaves much more in accordance with the XSL-FO specification. Try to
specify linefeed-treatment="preserve" in addition to
white-space-collapse="false" when using 0.96. Hopefully this will give you
the result you want.

This should work nicely (with 0.94; 0.96 does not exist yet ;-))

<fo:block linefeed-treatment="preserve"
          white-space-treatment="preserve"
          white-space-collapse="false">
{A Java class}
</fo:block>

white-space-treatment is equally important to preserve the leading spaces of the lines. If this reverts to its initial value of "ignore- if-surrounding-linefeed", those will be removed, leading to all lines starting at the same offset from the page-edge. I assume it's this latter effect Siegfried is referring to as "filled". All indentation (most likely inserted as spaces) in the source file will be lost.

Without preserved linefeeds, the linebreaks are calculated as if the block's text were prose. For poetry (and incidentally also source code ;-)), you need the above properties.

Cheers

Andreas


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

Reply via email to