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 Michael Halpin <mh...@globaluniversity.edu> on 2008/05/20 23:46:23 UTC

Handeling tradional orphans.

I realize that orphans according to fop are the first line of a
paragraph  at the bottom of a page where the rest of the paragraph
breaks onto the next page.  In traditional editing an orphan is a lone
word at the end of a paragraph.  Does anyone know if there is a way to
tell fop to either suck up the word to the previous line or to bump a
word down automatically as to avoid orphans at the end of a paragraph.

 

Thanks,
Michael
____________________
In the event that I am arrested for being a domestic enemy of the
state, you should know that it is not true, and I will be back in the
office just as soon as they reinstate Habeas Corpus
<http://en.wikipedia.org/wiki/Habeas_corpus#War_on_Terror> .

 


Re: Handeling tradional orphans.

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Michael,

Michael Halpin wrote:
> I realize that orphans according to fop are the first line of a
> paragraph  at the bottom of a page where the rest of the paragraph
> breaks onto the next page.  In traditional editing an orphan is a lone
> word at the end of a paragraph.

Just curious: how do you then call the first line of a paragraph alone
at the bottom of a page? Do you have a special term for that?

(And FWIW: it’s not FOP that calls that ‘orphan’, it’s the XSL-FO
standard that FOP implements. It’s not our fault ;-) )


> Does anyone know if there is a way to
> tell fop to either suck up the word to the previous line or to bump a
> word down automatically as to avoid orphans at the end of a paragraph.

There’s no setting to automatically achieve that, I’m afraid. What you
can do is insert a non-breaking space (U+00A0) between the last two
words of the paragraph. If the last word then becomes hyphenated, you
will also have to insert word joiners (U+2060) at each possible
hyphenation place in the last word. Be sure the encoding of the FO file
is UTF-8.

This may sound tedious, but if you are proof-reading a final copy
hopefully you will have to fix only a few paragraphs. You can also
implement some XSLT magic to automatically insert a non-breaking space
between the last two words of each paragraph, and as an approximation
a word joiner between each letter of the last word.

HTH,
Vincent


-- 
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

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


Re: Handeling tradional orphans.

Posted by Stefan Heuer <sh...@gmx.de>.
Hi Michael,

At least FOP 0.94 seams to support attributes about orphans and widows 
on block level elements. See:
http://xmlgraphics.apache.org/fop/compliance.html#fo-property-orphans

But I haven't tested it yet.

Regards

Stefan



Michael Halpin schrieb:
>  <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal 
{margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times 
New Roman";} a:link, span.MsoHyperlink {color:blue; 
text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed 
{color:purple; text-decoration:underline;} span.EmailStyle17 
{mso-style-type:personal-compose; font-family:Arial; color:windowtext;} 
@page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} 
div.Section1 {page:Section1;} -->
>
>  I realize that orphans according to fop are the first line of a 
paragraph  at the bottom of a page where the rest of the paragraph 
breaks onto the next page.  In traditional editing an orphan is a lone 
word at the end of a paragraph.  Does anyone know if there is a way to 
tell fop to either suck up the word to the previous line or to bump a 
word down automatically as to avoid orphans at the end of a paragraph.
>
> 
>
>  Thanks,
>  Michael
>  ____________________
>  *In the event that I am arrested for being a domestic enemy of the
>  state, you should know that it is not true, and I will be back in the
>  office just as soon as they reinstate Habeas Corpus 
<http://en.wikipedia.org/wiki/Habeas_corpus#War_on_Terror>.*
>
> 
>



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


Re: Handeling tradional orphans.

Posted by paul womack <pw...@papermule.co.uk>.
paul womack wrote:
> Michael Halpin wrote:
>> I realize that orphans according to fop are the first line of a 
>> paragraph at the bottom of a page where the rest of the paragraph 
>> breaks onto the next page.  
> 
> I'd call that a "widow", a term also used for headings
> which have "lost" their body text.
> 
>  > In traditional editing an orphan is a lone
>> word at the end of a paragraph.  Does anyone know if there is a way to 
>> tell fop to either suck up the word to the previous line or to bump a 
>> word down automatically as to avoid orphans at the end of a paragraph.
> 
> I work in the print/prepress trade, and the term orphan
> is generic (in my experience); "any trailing isolated thing".
> 
> The worst case I've ever seen was where the second half
> of a hyphenated word at the end of a paragraph
> wrapped onto the next page... !

Further context; in OpenOffice (v2.3 if it matters)
the options you're talking of are in "paragraph style",
"text flow", options. One of the options is "keep paragraph together"
If this is NOT checked, the options "widow control" and "orphan control"
can be used, both expressed as a number of lines.

    BugBear

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


Re: Handeling tradional orphans.

Posted by paul womack <pw...@papermule.co.uk>.
Michael Halpin wrote:
> I realize that orphans according to fop are the first line of a 
> paragraph at the bottom of a page where the rest of the paragraph 
> breaks onto the next page.  

I'd call that a "widow", a term also used for headings
which have "lost" their body text.

 > In traditional editing an orphan is a lone
> word at the end of a paragraph.  Does anyone know if there is a way to 
> tell fop to either suck up the word to the previous line or to bump a 
> word down automatically as to avoid orphans at the end of a paragraph.

I work in the print/prepress trade, and the term orphan
is generic (in my experience); "any trailing isolated thing".

The worst case I've ever seen was where the second half
of a hyphenated word at the end of a paragraph
wrapped onto the next page... !

   BugBear

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