Footnotes handling debug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Footnotes handling debug

Luca Furini
I'm trying to correct the footnotes handling, as the testfile
footnotes2.xml does not pass yet.

I succeeded in handling a page-dependent footnote separator, with the
reasonable (at least IMO) assumption that the separator bpd does not
change, but there is a check I don't understand:

    [...]
    <!-- last block on page 3 -->
    <eval expected="360000" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[last()]/@ipd"/>
    <eval expected="0" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[last()]/@bpd"/>
    [...]

Why should the last footnote block have bpd = 0?

Regards
    Luca



Reply | Threaded
Open this post in threaded view
|

Re: Footnotes handling debug

Jeremias Maerki
Sorry, Luca. My bad. The test should have been on the flow, not in the
footnote area. I've corrected it in CVS.

Right now, that last empty block creates a block area that has a BPD of
14400. In the end this area should collapse to a BPD of 0 so it doesn't
affect the page breaking. A footnote like this is a regular work-around
in 0.20.5 and we should have it working again. Or maybe it's just a
matter of getting linestacking-strategy right. I haven't investigated
much, yet. At any rate, this pattern is used to emulate
page-position="last". You would agree that an empty block should
collapse to a zero BPD, wouldn't you?

I hope this answers your question.

On 31.05.2005 18:13:25 Luca Furini wrote:

> I'm trying to correct the footnotes handling, as the testfile
> footnotes2.xml does not pass yet.
>
> I succeeded in handling a page-dependent footnote separator, with the
> reasonable (at least IMO) assumption that the separator bpd does not
> change, but there is a check I don't understand:
>
>     [...]
>     <!-- last block on page 3 -->
>     <eval expected="360000" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[last()]/@ipd"/>
>     <eval expected="0" xpath="//pageViewport[3]/page/regionViewport/regionBody/footnote/block[last()]/@bpd"/>
>     [...]
>
> Why should the last footnote block have bpd = 0?
>
> Regards
>     Luca
>
>



Jeremias Maerki

Reply | Threaded
Open this post in threaded view
|

Re: Footnotes handling debug

Luca Furini
In reply to this post by Luca Furini
Jeremias Maerki wrote:

> Right now, that last empty block creates a block area that has a BPD of
> 14400. In the end this area should collapse to a BPD of 0 so it doesn't
> affect the page breaking. A footnote like this is a regular work-around
> in 0.20.5 and we should have it working again. Or maybe it's just a
> matter of getting linestacking-strategy right. I haven't investigated
> much, yet. At any rate, this pattern is used to emulate
> page-position="last". You would agree that an empty block should
> collapse to a zero BPD, wouldn't you?

Yes, I agree with you: I'm going to fix this problem as soon as possible.

A related question: if there is a fo:block with linefeed-treatment =
"preserve" and two consecutive linefeeds, what is the expected output?

For example:
<fo:block linefeed-treatment="preserve">Text line 1.

Text line 2.</fo:block>

At the moment, there is an empty line between "Text line 1." and "Text
line 2.": should it collapse too? I would say yes, but I'm not sure ...

Regards
    Luca



Reply | Threaded
Open this post in threaded view
|

Re: Footnotes handling debug

Jeremias Maerki

On 06.06.2005 18:36:17 Luca Furini wrote:

> A related question: if there is a fo:block with linefeed-treatment =
> "preserve" and two consecutive linefeeds, what is the expected output?
>
> For example:
> <fo:block linefeed-treatment="preserve">Text line 1.
>
> Text line 2.</fo:block>
>
> At the moment, there is an empty line between "Text line 1." and "Text
> line 2.": should it collapse too? I would say yes, but I'm not sure ...

No, IMO it shouldn't collapse. linefeed-treatment="preserve" is defined
as requiring no special action when a linefeed is encountered. And a
linefeed is defined as moving the paper one line ahead in an
old-fashioned mechanical typewriter, so two linefeeds advance the paper
by two lines thus (in your example) leaving an empty line.


Jeremias Maerki