# Hyphenation on next-to-last line

On the next-to-last line of a paragraph, I have some hyphenation and on the last line, I only have the end of the word.

blablabla cou-
cou.
New paragraph


I thought the command \finalhyphendemerits could resolve this problem, but it doesn't seems to…

Any idea ? I’m using memoir class and XeLaTeX

-
What value are you setting \finalhyphendemerits to? –  egreg Jul 5 '12 at 23:32
\finalhyphendemerits=10000 –  Calixte Jul 6 '12 at 6:12
That's comparable to \penalty 100 when talking of line or page breaks, so it's not high enough; try 50000000. –  egreg Jul 6 '12 at 6:26

The value of \finalhyphendemerits should by much higher. Here's an example

\documentclass{article}
\usepackage{kantlipsum}
\textwidth=18pc
\begin{document}
\hyphenpenalty=-5000
\finalhyphendemerits=50000000

\kant[2]

\end{document}


The setting of \hyphenpenalty is just to invite TeX to hyphenate more frequently. Notice that the last line doesn't have a hyphen.

-