# Why is my document not hyphenating on words starting with upper case letter? (I am not using \uchyph=0)

I recently noticed on my thesis (template here) that words starting with upper case letter are not hyphenating. Then, I researched and found about the usage of \uchyph=0 How do I prevent TeX from hyphenating acronyms? Then, I tough some package mine was using it, but I could not find any one of them using it.

Then, I got this minimal example after one hour of binary search, i.e., trial and error by removing adding configurations and packages from my full thesis template until I got this minimal example:

\documentclass[10pt,a5paper]{memoir}
\usepackage[brazil]{babel}

\usepackage{anyfontsize}
\usepackage{lmodern}
\usepackage{microtype}

\setlrmarginsandblock{2.5cm}{1.5cm}{*}
\checkandfixthelayout

\emergencystretch=50em
\renewcommand{\normalsize}{\fontsize{10.5pt}{11pt}}

\begin{document}
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens.

linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens.
\end{document}

The combined presence of all these elements in my preamble is causing this problem of not hyphenating words starting with upper case letter.

Can I fix it without removing one of these commands or packages from my thesis template?

In my full thesis, just removing the \usepackage{lmodern} package does not fix the issue. I have to remove both \usepackage{lmodern} and \usepackage{anyfontsize}.

Related:

• +1 for the effort in finding the MWE. Jul 11 '19 at 11:11

It was unrelated to the capital letter other than that changed the widths so affected the possible linebreak points. You had a very large \emergencystretch so tex preferred to stretch the white space than hyphenate the word.

\documentclass[10pt,a5paper]{memoir}
\usepackage[brazil]{babel}

\usepackage{anyfontsize}
\usepackage{lmodern}
\usepackage{microtype}

\setlrmarginsandblock{2.5cm}{1.5cm}{*}
\checkandfixthelayout

%\emergencystretch=50em
\renewcommand{\normalsize}{\fontsize{10.5pt}{11pt}\selectfont}% \selectfont needed

\begin{document}

\showhyphens{Linguagens linguagens}

Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens Linguagens Linguagens Linguagens Linguagens
Linguagens Linguagens.

linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens
linguagens linguagens linguagens linguagens linguagens linguagens linguagens.
\end{document}

With no emergencystretch as above you get some overfull lines as there are no good linebreaking points, If you add a small amount of stretch then you can allow linebreaks without having excessive stretch. With 0.5em instead of 50em you get no overfull lines and

\emergencystretch=.5em

• Is there an equivalent to \emergencyshrink, i.e., opposite of \emergencystretch?
– user
Jul 12 '19 at 1:53
• @user no, just stretch Jul 12 '19 at 6:42
• I just see I can call \usepackage[factor=1100,stretch=10,shrink=10]{microtype}, i.e., passing some parameters which seem promising. Would this shrink parameter to an equivalent for "\emergencyshrink" (as opposed to \emergencystretch)?
– user
Nov 11 '19 at 3:17
• @user not really, I think that is more like setting a shrink component to \spaceskip which is setting the default shrink, ie making the text generally tighter rather than being an emergency shrink that just makes it tighter if there is no better alternative. So it may be what you want but it isn't really comparable to emergencystretch. Nov 11 '19 at 10:03