8

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

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

1 Answer 1

7

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.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.