# Underfull and Overfull \hbox(xxxxpt too wide) detected at line

I get a lot of warning message:

Underfull and Overfull \hbox(xxxpt too wide) detected at line xxx

I am using \documentclass[12pt,oneside]{book} as my document class. (I am not sure I am correct)

I tried to click on each error message, but could not figure out what is the problem, all is printed.

Error1:

    \begin{enumerate}[label=(\roman*),font=\itshape]
\item \textbf{ITEM1} \\
testing test \\

\item \textbf{ITEM2} \\
testing test2 \\

\end{enumerate}


• The error messages are actually fairly specific: What's going on around lines 1668-1671 of 07-chapter.tex, lines 1933-1936 of 07-chapter.tex, lines 61-67 of 077.tex, and lines 82-87 of 077.tex? Please alo state which document class you employ.
– Mico
May 31 '20 at 8:23
• @Mico thanks. I editted my questions \documentclass[12pt,oneside]{book}. However, when I click on the error location, it seemed do not have any problem, all the words is printed.
– aan
May 31 '20 at 8:33
• They are printed but the lines are too long and stick into the margin. May 31 '20 at 8:52
• Have a look at tex.stackexchange.com/q/111948/35864 and tex.stackexchange.com/q/35/35864. Essentially the message means that TeX can't quite fit the words exactly into the usual line length May 31 '20 at 8:52
• Unless you edit your posting to show the actual LaTeX code in question, there's very little one can say.
– Mico
May 31 '20 at 8:55

You need to show the code that produces this if you want specific help.

The overfull boxes mean that TeX could not find a good place to break a line and so the line is sticking in to the margin by a few points. See Do I have to care about bad boxes?

The underfull boxes in general mean that TeX is having to over-stretch white space in order to justify lines, except that you are showing badness 10000 which is the maximum level of badness. As it is hard to get that bad by accident it usually means you are misusing \\ at the end of a paragraph. See What does the phrase "Underfull \hbox (badness 10000) in paragraph" actually mean?

• yes, you are correct, I used \ to make a newline in enumerate. I had added in my error code.
– aan
May 31 '20 at 9:11
• @aan they do not add vertical space they force an empty line of the paragraph. It is almost always an error to use \\  outside of tables and math alignments. You are already using (although you have not said, or provided any code to allow anyone to test) enumitem package to customise teh list so just give a non zero value to itemsep if you want vertical separation do not add space to each item and certainly don't add an error-empty box to each May 31 '20 at 9:13
• how can I force a newline in enumerate?
– aan
May 31 '20 at 9:14
• @aan you really should never be forcing new lines or space in the document the whole idea is to separate the layout specification, in your document class, from the text of the document in the document body. May 31 '20 at 9:16