I am testing the behavior of "\-". If I make a very long word and insert "\-" in between every single letter, I get some confusing behavior. See the following example:The command \- inserts a discretionary hyphen into a word. This also becomes the only point hyphenation is allowed in this word.
Code: Select all
\documentclass[draft]{book}
\begin{document}
a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a\-a
\end{document}
Why doesn't the hyphenation algorithm appropriately hyphenate the word and thereby avoid bad boxes? If more than one hyphenation point is allowed per word (i.e., the manual is wrong), shouldn't LaTeX be able to prevent bad boxes when it's given every possible hyphenation point?