I have a memoir setup for my PhD thesis, which deals with South American languages.
This means that there are a lot of language names, as well as non-English titles in the bibliography.
LaTeX fails to properly hyphenate these.
Now, I can see some of the words it did not hyphenate, as they go over the right edge of the text, resulting in black boxes (in draft mode).
At the end of the .log file, it says 320 hyphenation exceptions out of 8191, which I take to mean that LaTeX has a list of these exceptions somewhere.
How can I find it?
It would be much more practical to have a generated list of words it didn't know how to hyphenate, rather than to have to go through the entire document manually.
- 55
1 Answers
The hyphenation exceptions are words specified by \hyphenation with specific breakpoints and are fixed in the format, unrelated to a specific document unless you have added extra \hyphenation in your document.
The log file shows you the overfull lines and so the words at the end of the line eg
\documentclass[draft]{article}
\begin{document}
some text withverylongwords some text withverylongwords
some text withzverylongwords some text withverylongwords
some text withverylongwords some text withverylongwords
some text withverylongwords some text withverylongwords
\end{document}
The overfull line is marked with the rule in the output and
the terminal and log show
Overfull \hbox (0.50061pt too wide) in paragraph at lines 6--10
\OT1/cmr/m/n/10 zvery-long-words some text with-very-long-words some text with-
very-long-words some|
So you could easily get a list of all such words by searching for | in the log file.
Note however that the last word here is some which can not sensibly be hyphenated you need in this case to change the hyphenation on an earlier line, changing the source to have with\-z\-verylongwords produces
Linebreaking/hyphenation uses a least cost algorithm over an entire paragraph so changing the hyphenation points of any word may change the line breaking in the whole paragraph, so just a list of final words in an existing bad typesetting does not typically help much.
- 757,742
-
So there will also be overfull hboxes for words it would in theory know how to hyphenate, but doesn't because the cost would be too high? – folran Oct 05 '20 at 11:57
-


\hyphenation{foot-ball}in the format by babel, to special case words not covered by the general patterns for the language you are using. You can not get the list from tex, but you can look in the source for your language config. – David Carlisle Oct 05 '20 at 10:56