# Why does a word extend into the right margin?

The result of the code below is that the second and third lines are right-justified as one would expect, but the word "them" at the end of the first line (just after "checked") extends to the right of that vertical line by the width of the "m". Why does that happen?

\documentclass[12pt]{article}

\usepackage{fullpage}

\setlength{\parindent}{3mm}
\setlength{\parskip}{12pt}

\newenvironment{qwote}
{\begin{quote}\setlength{\parskip}{5pt}\setlength{\parindent}{6mm}}
{\end{quote}}

\begin{document}

\begin{description}

\item [Chapter 6, Spaceman'' Jones. page 59.]

\begin{qwote}
The crewman who had checked them into the ship told
them to follow him; he led them to the Purser's office.
\,\dots\, Max surrendered his forged personal record
book, while feeling as if the deception were stamped
on it in bold letters.
\end{qwote}

\end{description}

\end{document}


If your solution may be restricted to pdflatex, the microtype package with some adjustment of parameters seems to be optically better than using \sloppy:

\documentclass[12pt]{article}

\usepackage{fullpage}
\usepackage[stretch=20,shrink=50]{microtype} % PS

\setlength{\parindent}{3mm}
\setlength{\parskip}{12pt}

\newenvironment{qwote}
{\begin{quote}\setlength{\parskip}{5pt}\setlength{\parindent}{6mm}}
{\end{quote}}

\overfullrule5pt % PS
\begin{document}

\begin{description}

\item [Chapter 6, Spaceman'' Jones. page 59.]

\begin{qwote}
The crewman who had checked them into the ship told
them to follow him; he led them to the Purser's office.
\,\dots\, Max surrendered his forged personal record
book, while feeling as if the deception were stamped
on it in bold letters.
\end{qwote}

\end{description}

\end{document}


• I tried this in a moderately long document and there were several places where it went into the right margin and put a black rectangle to the right of the line. Jan 11, 2020 at 23:08
• @MichaelHardy Yes, I have added \overfullrule5pt to easily see the places where the line is longer than should be. You can comment out this line. Jan 12, 2020 at 0:04

tex did warn in the log that it could find no way to break that paragraph, Several possibilities, the easiest is to use \sloppy which allows more variability in white space.

\newenvironment{qwote}
{\begin{quote}\sloppy\setlength{\parskip}{5pt}\setlength{\parindent}{6mm}}
{\end{quote}}