1

Consider this example:

\documentclass{report}
\usepackage{graphicx}
\usepackage{caption}
\begin{document}
\begin{itemize}
\item[efficiency] The ledenn and isolatiosdfsf sdfdsy is mead using the tag-and-probe method~\ref{fig:a}. This method uses owasdfn mass diasdf-sdfobjt redfnances Sadstudy electallk symme breallking and s\
edarch or he ggh. asfasdf  ererer tyerher hhtyh eertyhrty gfbfghh erthgfha rwer  wwerewr dfdsfdsgf tewrtert rdjty jejtyj  rhrtrth ryreyrt jtythw. etewrt tert . weterte hHig in Fig. the Hig
\end{itemize}
\begin{figure}
  \includegraphics[width=0.5\textwidth]{example-image-a}
  \caption{A}
  \label{fig:a}
\end{figure}

\end{document}

The text output is:

enter image description here

Why is the first line in item "efficiency" salient? It seems Latex there has plenty of freedom to make the right side justified.

  • 2
    While it may seem so, TeX disagrees with your assessment. Try adding \sloppy to your preamble and see the problem disappear...at the expense of large word gaps. NOTE: you have disabled the hyphenation of method – Steven B. Segletes Apr 15 at 17:45
  • @StevenB.Segletes the gaps seem much more innocuous than a line sticking out. – Viesturs Apr 15 at 17:48
  • The line justification algorithm is all about assigning penalties and minimizing the objective function. If gaps are not objectionable, then redefining the penalties is appropriate. – Steven B. Segletes Apr 15 at 17:51
3

The hyphenation of the word method has been disabled by following it with a hard space. You have two options: manually reinsert a hyphenation point, or put up with wider gaps associated with \sloppy or sloppypar.

\documentclass{report}
\usepackage{graphicx}
\usepackage{caption}
\begin{document}
\begin{itemize}
\item[efficiency] The ledenn and isolatiosdfsf sdfdsy is mead using the tag-and-probe me\-thod~\ref{fig:a}. This method uses owasdfn mass diasdf-sdfobjt redfnances Sadstudy electallk symme breallking and s\
edarch or he ggh. asfasdf  ererer tyerher hhtyh eertyhrty gfbfghh erthgfha rwer  wwerewr dfdsfdsgf tewrtert rdjty jejtyj  rhrtrth ryreyrt jtythw. etewrt tert . weterte hHig in Fig. the Hig
\end{itemize}

\sloppy
\begin{itemize}
\item[efficiency] The ledenn and isolatiosdfsf sdfdsy is mead using the tag-and-probe method~\ref{fig:a}. This method uses owasdfn mass diasdf-sdfobjt redfnances Sadstudy electallk symme breallking and s\
edarch or he ggh. asfasdf  ererer tyerher hhtyh eertyhrty gfbfghh erthgfha rwer  wwerewr dfdsfdsgf tewrtert rdjty jejtyj  rhrtrth ryreyrt jtythw. etewrt tert . weterte hHig in Fig. the Hig
\end{itemize}
\begin{figure}
  \includegraphics[width=0.5\textwidth]{example-image-a}
  \caption{A}
  \label{fig:a}
\end{figure}

\end{document}

enter image description here

  • I noticed this problem only in the itemize environment. Could it be possible also in the main text? – Viesturs Apr 15 at 17:53
  • 1
    @Viesturs The exact same problem is possible in main text as well. However, since itemize has a narrower column width, the problem is more likely there. – Steven B. Segletes Apr 15 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.