Forum How do I...?

single word on the last line of a paragraph

Bayanna
Is there a separate setting for orphans using CSS that are internal to a page, when the single word falls at the last line of paragraph?

Let me know if my question doesn't make sense.
jim_albright
It is unfortunate that we use the same word with two different meanings but both in the context of typesetting.

Jim Albright
Wycliffe Bible Translators

Bayanna
Okay, thanks for the info.
However is there any future plan for implementing this at all?
dauwhe
It's quite a tricky question. What if the last word is "antidisestablishmentarianism"? Some publishers specify a minimum number of characters on the last line, excluding punctuation. Others specify a minimum length—such as clearing the paragraph indent. There's been some discussion of this in the CSS Working Group recently. One proposal was for a "last-line-length" property which would take a percentage value.
Bayanna
Dear Dauwhe,

Many thanks for your prompt reply.

I just thought that it is extremely very rare case that word exists in any book, and it is also true that there is no rule if it is there that this will be a last word of the paragraph.

By looking at the standard/regular words that they written for last word to a paragraph, I got feeling of whether it is possible or not.

Thanks again.
mikeday
There is no setting for last word in a paragraph, but we are trying to improve line-breaking for future releases of Prince.
tart2000
It's also a problem for single characters. In French, exclamation points (for example) are supposed to have a space before them. Which means they can end up on their own on the last line of a paragraph. And it makes people sad...

Edited by tart2000

mikeday
You could replace the space with a non-breaking space, either using JavaScript or the prince-text-replace property, like this:
p {
    prince-text-replace: ' !' '\A0!'
}
tart2000
Oh, thanks @mikeday, this is really neat !