[Tex/LaTex] Why is Latex hyphenating some words automatically, but others dont

babelbadnessdebugginghyphenation

On this example, the word usando is not being hyphenated, but the word Comandos is. If I force a hyphen on the first word usan-do, it is hyphenated correctly:

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

\usepackage[showframe]{geometry}
\setlength{\parindent}{1.6cm}

\begin{document}

\frenchspacing
\selectlanguage{brazil}
No entanto, vocĂȘ pode compilar os documentos \LaTeX usando os seguintes
comandos, que devem ser digitados no \emph{Prompt de Comandos} do Windows ou no
\emph{Terminal} do Mac ou do Linux:

\end{document}

enter image description here

test2.tex:11: Overfull \hbox (4.94724pt too wide) in paragraph at lines 11--14[]\OT1/cmr/m/n/10 No en-tanto, voc pode com-pi-lar os do-cu-men-tos L[]T[]Xusando

Is there some way to debug the LaTeX hyphenation? For example, I can debug the overfull boxes, using \usepackage[showframe]{geometry} or \usepackage{showframe} in my preamble. So, is there some package I can include which helps me to find out why LaTeX is not hyphenating some words?


Related questions:

  1. LaTeX Hyphenation
  2. German hyphenation does not work
  3. How to prevent LaTeX from hyphenating the entire document?

Best Answer

At first the word \LaTeX right before usando is confusing the hyphenation. But most importantly: \righthyphenmin is 3 in this language, that means that LaTeX will never break 2 chars at the end. You can change this:

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

\usepackage[showframe]{geometry}
\setlength{\parindent}{1.6cm}

\renewcommand\brazilhyphenmins{22} %left=2, right=2

\begin{document}

\frenchspacing
\selectlanguage{brazil}
No entanto, vocĂȘ pode compilar os documentos \LaTeX{} usando os seguintes
comandos, que devem ser digitados no \emph{Prompt de Comandos} do Windows ou no
\emph{Terminal} do Mac ou do Linux:

\end{document}
Related Question