# Justifying text and removing unwanted space

Using LaTeX text justification, sometimes the output tend to have more space in order to be justified from right and left as shown in the following picture. Between the Dr. and Lloyd is more space than required. How can I avoid this.

• Would you consider adding your code? Otherwise, it will be just a guessing game. – hola Jun 29 '14 at 20:21

When LaTeX recognizes a colon after a small letter which is followed by a capital letter, LaTeX interprets this as the end of a sentence and thus as a period. In this case, the space between colon/period and the following word becomes bigger and can become ugly for justified texts. As recommended in this answer, you should tell LaTeX that this colon is not ending the sentence by typing Dr.\ Lloyd.

% arara: pdflatex

\documentclass{article}
\usepackage{ragged2e}
\usepackage{blindtext}

\begin{document}
{\justifying\scriptsize I would like to extend my gratitude to Computer Suport Group and specially Dr. Lloyd \blindtext}

{\justifying\scriptsize I would like to extend my gratitude to Computer Suport Group and specially Dr.\ Lloyd \blindtext}
\end{document}


It has been asked in comment, if this behaviour persists for other babel-variants of the English language. I have tested the below MWE and got the same result for all combinations I have tested so far.

% arara: pdflatex

\documentclass{article}
\usepackage[%
,british
,UKenglish
,USenglish
,english
,american
]{babel}

\begin{document}
\noindent Dr. Lloyd\\
Dr.\ Lloyd
\end{document}


• Does it even if you specify you're writing American English with babel? Another solution would be to write British English if it's possible. – Bernard Jun 29 '14 at 19:44
• @Bernard I am not sure, if I got you right. Please see the second part of my answer. Until we do not get more information from the OP, I can't provide any better. – LaRiFaRi Jun 29 '14 at 21:50
• @LaRiFaRi -- good enough answer, but the problam is a period, not a colon. also, this situation is built into tex itself; doesn't matter what language is involved. (documented in the texbook.) – barbara beeton Jun 29 '14 at 21:59
• Probably Dr.~Lloyd is even better as it disallows a line break after Dr. – egreg Jun 29 '14 at 22:32
• Another option is to issue the directive \frenchspacing, which instructs TeX not to insert extra whitespace after any punctuation marks. – Mico Jun 29 '14 at 22:45