Re: Pushing the Limits

Arved Sandstrom wrote:

>Hi, Peter
>
>On the orphans thing, my interpretation is that page 2 is truly empty. Block
>2 has generated no areas into the main-reference-area in the page 2
>content-rectangle at all. So "orphans" does not apply.
>
>Good question about the "strength" of oprhans and widows, though. I dunno.
>

Arved,

I've just read Paul's response, and modified this message-in-progress 
accordingly.

The reason that block 2 has generated no areas in the 
main-reference-area in page 2 is that "keep 1" has trumped orphans. (Or 
would have, if Paul had not straightened us out about that.) I think the 
question about the strength of orphans and widows relative to keeps 
still needs to be resolved.

Paul's response confirms me in the page-master selection logically 
precedes the formatting, even though the conditionals can sometimes only 
be determined by a first layout, e.g. for page-position="last".

Take the situation in which the second single-page-master-reference from 
your example is replaced by a repeatable-page-master-alternatives with a 
maximum-repeats of 1, and a conditional-page-master-reference naming SPM 
"small", with default conditions, as below. The second (blank) page will 
be generated.

<fo:block break-after="page">NOT MUCH STUFF</fo:block>

<fo:block keep-together.within-page="1">
    .... QUITE A LOT OF STUFF ....
</fo:block>

The fo:flow, for sake of simplicity, contains these only. Simple-page-master
(SPM) "small" cannot accommodate the second block, but SPM "large" can.
Furthermore, the containing page-sequence maps to

<fo:page-sequence-master master-name="psm">
    <fo:single-page-master-reference master-reference="small"/>
    <fo:repeatable-page-master-alternatives maximum-repeats="1">
      <fo:conditional-page-master-reference master-reference="small"/>
    </fo:repeatable-page-master-alternatives>
    <fo:repeatable-page-master-reference master-reference="large"/>
</fo:page-sequence-master>

Now add another condition, preceding the existing default, so that you have
      <fo:conditional-page-master-reference master-reference="small" blank-or-not-blank="blank"/>
      <fo:conditional-page-master-reference master-reference="small"/>

The blank page will again be generated, presumably by the first condition.

6.4.11 fo:conditional-page-master-reference, has "The sub-condition corresponding to the *blank-or-not-blank* trait is| true|, ... if (2) the value of the trait is "blank" and the page generated using the fo:conditional-page-master-reference is such that there are no areas from the fo:flow to be put on that page (e.g., ... (b) because the constraints on the areas generated by descendants of the fo:flow formatting object would not be satisfied if they were descendant from this page)"

In the circumstances quoted above, the decision as to whether to use this conditional master can presumably only be made when the page has been formatted using one of the other other alternatives.  There is no constraint, however, on the master-reference that I use in the conditional.  So I could, for example, do this:
      <fo:conditional-page-master-reference master-reference="large" blank-or-not-blank="blank"/>
      <fo:conditional-page-master-reference master-reference="small"/>

The first would fail, because the page formatted with the "large" SPM would not be blank.  On to the second, which would produce a blank page.

I think that either clause (b) needs to be removed, or it must somehow be tied to the master-reference of another conditional, so that the *this page* in the clause "because the constraints on the areas generated by descendants of the fo:flow formatting object would not be satisfied if they were descendant from this page," has some meaningful referent.  In the other cases (like blank pages generated to maintain a page numbering sequence) the condition generating the blank is external, so to speak, and is not contingent on the SPM that the conditional refers to, which allows that SPM to constructed as a specifically blank page.

Peter

Received on Saturday, 23 March 2002 21:14:27 UTC