74

I have this warnings around, some of them seems to be solved naturally but I never really understand what do they mean.

What this means?

Edit: I would like to keep the question in more general terms, but in this particular case the source code related to this warning is the following:

\item {\bf Finalização} onde são finalizados os histogramas, eventualmente traçadas curvas de ajuste \emph{(fit)} e guardados os resultados no disco.

Possible duplicate: This question solves the debug issue of this.

PS: Sorry if this question is quite newbie.

RSFalcon7
  • 945
  • 12
    In simple words, it means you have a line of text that is too wide (9.8961pt too wide to be precise) to fit in one line, so the program tries to break it unsuccessfully, hence the warning. – Mario S. E. May 02 '13 at 15:00
  • 1
    But the generated pdf has this line just has expected (I will put the corresponding source in the question) – RSFalcon7 May 02 '13 at 15:04
  • not really. What happens is that 9.89561pt = 3.49mm, which is almost nothing for the naked (inexperienced?) eye to see. – Mario S. E. May 02 '13 at 15:07
  • so it is less than 10% of a single character? – RSFalcon7 May 02 '13 at 15:15
  • 11
    @MarioS.E. 9.89...pt is, in Computer Modern @10pt, almost the width of one-and-a-half ms. There might be people unable to see that with the naked eye, but what these people need isn't experience, but new glasses ;) – Nils L May 02 '13 at 15:18
  • @NilsL good point, but since what he has is plain report text I was aiming that wasn't the case. – Mario S. E. May 02 '13 at 15:22
  • RSFalcon7 Have you loaded \usepackage[portuguese]{babel} at the beginning of the document? – Mario S. E. May 02 '13 at 15:26
  • @MarioS.E. I'm rewriting this document in english, so I change the portuguese to english. What is the relevance of this in the overfull hbox? – RSFalcon7 May 02 '13 at 20:05
  • 4
    @RSFalcon7 It's important because the hyphenation of each word is given according to the language – Mario S. E. May 02 '13 at 20:07
  • related: https://tex.stackexchange.com/q/35/30481 – glS Oct 13 '19 at 20:55

2 Answers2

41

The allowed space between two words is given by the interwordspace (\fontdimen2\font) and interwordstretch (\fontdimen3\font). If it is not possible to set a paragraph with these lengths (with hyphenation) TeX will complain with a overfull or underfull box. Setting the \emergencystrech to a value greater than 0pt it can stretch the interwordspace to a bigger value. You can set this value individually or using \sloppy or the environment sloppypar

\documentclass[draft]{article}
\usepackage[textwidth=4.5cm]{geometry}
\usepackage{blindtext}
\parindent=0pt
\begin{document}
interwordspace: \the\fontdimen2\font \\

interwordstretch: \the\fontdimen3\font \\

emergencystretch: \the\emergencystretch\par
\blindtext

\newpage
\begin{sloppypar}
interwordspace: \the\fontdimen2\font \\

interwordstretch: \the\fontdimen3\font \\

emergencystretch: \the\emergencystretch\par
\blindtext
\end{sloppypar}

\end{document}

enter image description hereenter image description here

Moriambar
  • 11,466
6

for my case, the easiest solution that I found is to add \begin{sloppypar} after \maketitle and to add \end{sloppypar} at the end of my document. It worked like charm: I don't have any text going out of the columns anymore. My document tex looks like:

\begin{document}
% title + keywords + abstract 
\maketitle
\begin{sloppypar}
% document body
\end{sloppypar}
\end{document}
  • Please, can you put a MWE to see your solution? – Sebastiano Jan 07 '21 at 20:03
  • i don't understand what do you mean with MWE? I had the overfull issue and I could fix it by adding sloppypar ... have you tried it? didn't work for you? – ahmed_khan_89 Jan 07 '21 at 20:12
  • I have only asked only to put a minimal working example (MWE) of your solution starting from \documentclass to \end{document}. – Sebastiano Jan 07 '21 at 20:32
  • 2
    sloppy and sloppypar allow large spaces between words. Using them is a last resort, not something for the whole document. – Ian Thompson Jan 07 '21 at 21:32
  • 2
    Thanks for your comments. I am a beginner in the world of Latex. I just wanted to share with others what solved the issue for me... I can understand that it's not optimal, but i am going to stick with it, for the moment. I have added a MWE, with the hope it can be helpful. – ahmed_khan_89 Jan 08 '21 at 01:49
  • 1
    Worked like a charm – Ekaveera Gouribhatla Apr 01 '21 at 04:53