Re[4]: [xep-support] Orphans & Widows

From: Alexander Peshkov (peshkov@renderx.com)
Date: Wed May 05 2004 - 06:05:50 PDT

  • Next message: Victor Mote: "RE: [xep-support] uri(file:xxx) links"

    Hello William,

    First of all I would like to note that XSL-FO specification is not very
    explicit when describing scope of orphans/widows. It refers to
    "number of line-areas in the first/last area generated by the formatting object"
    but it is not clear that is the first area in this context.

    We believe that first area produced by formatting object do not
    include line areas produced by its descendants, that's why in your
    first example below XEP can break page after section title.
    In the situations like yours it is natural to use keep-with-next.within-page="always"
    on the section title block instead of 'orphans'.

    The same is for the second example - you expect that all line areas
    generated by descendants of the topmost block will be taken into
    account then its 'widows' property interpreted. Note however that
    orphans/widows properties are inheritable and if your interpretation
    will be used you won't have any breaks unless one of the nested blocks
    is 7 lines long (orphans="2" (default) and widows="5").
    Again, there is a simpler way to achieve desired effect - just set
    keep-together.within-page="always" keep-with-pevious.within-page="always"
    on the signature table instead of using 'widows'.

    I believe both examples mentioned in your letter are typical usecases
    for keep properties rather then for orphans/widows.

    Best regards,
    Alexander Peshkov mailto:peshkov@renderx.com
    RenderX

    SW> Note: most attributes have been removed to reduce the size of the post and
    SW> to make it easier to read.

    SW> The first example that I have been unable to get working is very simple, in
    SW> fact if I'm not mistaken, default behavior should cover it;

    SW> <fo:block orphans="2">
    SW> <fo:block>
    SW> <fo:inline color="blue">Section Title</fo:inline>
    SW> </fo:block>
    SW> <fo:block>Yiss blab blow, etc, and so on...</fo:block>
    SW> </fo:block>

    SW> The section title appears on the last line of a page and the body of the
    SW> section appears on the next page.

    SW> In the next example we have a signature line in a table and we don't want
    SW> the signature line to be widowed, we want it to show up with at least some
    SW> content from the report else the signature has no context and could be
    SW> attached to any report. (I had read somewhere out in netland that
    SW> widows/orphans should apply equally to all block level constructs including
    SW> tables but the W3 spec did not seem to be that specific. You'll have to
    SW> inform me of your product's implementation.)

    SW> <fo:block widows="5">
    SW> <fo:block>
    SW> <fo:block>
    SW> <fo:inline color="blue">Comment</fo:inline>
    SW> </fo:block>
    SW> <fo:block>My final impression is...</fo:block>
    SW> <fo:block>Daffy once said --"I looked....</fo:block>
    SW> <fo:block>I must say that I've...</fo:block>
    SW> </fo:block>
    SW> <fo:block>
    SW> <fo:block space-before="15pt"/>
    SW> <fo:block>Mickey Mouse, MD, was personally present...</fo:block>
    SW> <fo:block>
    SW> <fo:table>
    SW> <fo:table-column/>
    SW> <fo:table-column/>
    SW> <fo:table-body>
    SW> <fo:table-row height="22pt">
    SW> <fo:table-cell>
    SW> <fo:block/>
    SW> </fo:table-cell>
    SW> <fo:table-cell>
    SW> <fo:block/>
    SW> </fo:table-cell>
    SW> </fo:table-row>
    SW> <fo:table-row>
    SW> <fo:table-cell>
    SW> <fo:block>________________________</fo:block>
    SW> </fo:table-cell>
    SW> <fo:table-cell>
    SW> <fo:block>________________________</fo:block>
    SW> </fo:table-cell>
    SW> </fo:table-row>
    SW> <fo:table-row>
    SW> <fo:table-cell>
    SW> <fo:block>Mickey Mouse, MD</fo:block>
    SW> </fo:table-cell>
    SW> <fo:table-cell>
    SW> <fo:block>Donald Duck, MD</fo:block>
    SW> </fo:table-cell>
    SW> </fo:table-row>
    SW> </fo:table-body>
    SW> </fo:table>
    SW> </fo:block>
    SW> </fo:block>
    SW> </fo:block>

    SW> In this case the line "Mickey Mouse was..." is the last line on a page and
    SW> the signature lines appear on the next page.

    SW> We have a workaround wherein 1) report sections are tables, 2) rows are kept
    SW> together, and 3) signature lines are appended to the table of the last
    SW> section processed. This approach works but has limitations due to the fact
    SW> that report sections cannot break over a page. This leads to situations
    SW> some percentage of a page is used up and the next section is too large for
    SW> the remaining space thus breaking to the next page. We would much prefer
    SW> the simplicity and flexibility of widow/orphan control.

    SW> Bill Schroeder

    >> ----------
    >> From: Alexander Peshkov[SMTP:peshkov@renderx.com]
    >> Reply To: xep-support@renderx.com
    >> Sent: Friday, April 30, 2004 4:41 AM
    >> To: Schroeder, William
    >> Subject: Re[2]: [xep-support] Orphans & Widows
    >>
    >> Hello William,
    >>
    >> Orphans and widows properties are aimed to control separation of text
    >> lines of the paragraph (fo:block) on the pagebreak. Those properties
    >> do not control behavior of block sequences or table rows. It's still
    >> not clear to me what are you doing. If you post code snippet (or short
    >> example) of your document we will try to figure out the best way to
    >> achieve desired effect.
    >>
    >> Best regards,
    >> Alexander Peshkov mailto:peshkov@renderx.com
    >> RenderX
    >>
    >>
    >> SW> Actually, we already have some code in place that appends signature
    >> lines to
    >> SW> the previous section and uses keep-with-next to enforce some of our
    >> SW> requirements. The code is cumbersome and has limitations that can lead
    >> to
    >> SW> significant blank spaces at the bottom of pages. Using widows and
    >> orphans
    >> SW> would greatly simplify the situation, eliminate the limitations, and
    >> reduce
    >> SW> the size of the fo file.
    >>
    >> SW> Right now I'm just trying to get something (anything) to move from one
    >> page
    >> SW> to another. Since my original post, I have not even been able to get
    >> simple
    >> SW> examples (similar to those given in response to Anders Svensson's post
    >> on
    >> SW> 10/21/2003) to work. Either I've missed something fundamental or this
    >> SW> feature just dosen't work. (It seems like it ought to be just as easy
    >> as
    >> SW> <fo:block orphans="5">.)
    >> SW> Bill Schroeder
    >>
    >> >> ----------
    >> >> From: Rose, Richard[SMTP:Richard.Rose@capitalone.com]
    >> >> Reply To: xep-support@renderx.com
    >> >> Sent: Thursday, April 29, 2004 11:54 AM
    >> >> To: 'xep-support@renderx.com'
    >> >> Subject: RE: [xep-support] Orphans & Widows
    >> >>
    >> >> Try adding keep-with-next.within-page="always" attribute to the first 2
    >> of
    >> >> your fo:block's, this should keep them together.
    >> >>
    >> >> Richard Rose
    >> >>
    >> >> -----Original Message-----
    >> >> From: Schroeder, William [mailto:SCHRO006@onyx.dcri.duke.edu]
    >> >> Sent: 29 April 2004 15:46
    >> >> To: 'xep-support@renderx.com'
    >> >> Subject: [xep-support] Orphans & Widows
    >> >>
    >> >>
    >> >> I'm a newbie xep-support subscriber and I'm trying to get widows &
    >> orphans
    >> >> attributes working. I have created a report with signature lines at
    >> the
    >> >> end. Each signature line takes 3 rows, 1 for spacing, 1 for the line,
    >> and
    >> >> 1
    >> >> for the name under the line. The first signature line occurs at the
    >> >> bottom
    >> >> of a page with the rest on the next page. The fo is essentially a block
    >> >> containing a 2 column table with an empty table-header and a table-body
    >> >> containing the signature lines. I reason that by setting the orphans
    >> >> attribute to something greater than 3 that this should force the lone
    >> >> signature line to the next page with the others. I have not been able
    >> to
    >> >> get the signature line to budge. I have tried numerous combinations &
    >> >> permutations of orphans & widows at the level of the fo:block,
    >> fo:table,
    >> >> and
    >> >> fo:table-body but nothing seems to work. Any ideas?
    >> >>
    >> >> Bill Schroeder
    >> >>
    >> >> -------------------
    >> >> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    >> in
    >> >> the body of the message to majordomo@renderx.com from the address you
    >> are
    >> >> subscribed from.
    >> >> (*) By using the Service, you expressly agree to these Terms of Service
    >> >> http://www.renderx.com/tos.html
    >> >>
    >> >>
    >> **************************************************************************
    >> >> The information transmitted herewith is sensitive information intended
    >> >> only
    >> >> for use by the individual or entity to which it is addressed. If the
    >> >> reader
    >> >> of this message is not the intended recipient, you are hereby notified
    >> >> that
    >> >> any review, retransmission, dissemination, distribution, copying or
    >> other
    >> >> use of, or taking of any action in reliance upon this information is
    >> >> strictly prohibited. If you have received this communication in error,
    >> >> please contact the sender and delete the material from your computer.
    >> >> -------------------
    >> >> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    >> >> in the body of the message to majordomo@renderx.com from the address
    >> >> you are subscribed from.
    >> >> (*) By using the Service, you expressly agree to these Terms of Service
    >> >> http://www.renderx.com/tos.html
    >> >>
    >> SW> -------------------
    >> SW> (*) To unsubscribe, send a message with words 'unsubscribe
    >> xep-support'
    >> SW> in the body of the message to majordomo@renderx.com from the address
    >> SW> you are subscribed from.
    >> SW> (*) By using the Service, you expressly agree to these Terms of
    >> Service http://www.renderx.com/tos.html
    >>
    >>
    >> -------------------
    >> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    >> in the body of the message to majordomo@renderx.com from the address
    >> you are subscribed from.
    >> (*) By using the Service, you expressly agree to these Terms of Service
    >> http://www.renderx.com/tos.html
    >>
    SW> -------------------
    SW> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    SW> in the body of the message to majordomo@renderx.com from the address
    SW> you are subscribed from.
    SW> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Wed May 05 2004 - 06:17:34 PDT