# Do you know why I have this warning: underfull \hbox(\badness 10000), using visual studio code with Latex extension

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\begin{document}
\maketitle
\subsection*{2. P18. Exercise 3:}
Assume we have a fair eight-sided die with the numbers 1, 2, 3, 3, 4, 5, 5, 5 on its sides.
What is the probability that each of the numbers 1 through 5 will be rolled?
If we roll two of these dice, what is the range of possible totals of the values showing
on the two dice? What is the chance that each of the numbers in this range will be rolled?\\

• Just don't force a linebreak with \\ Use \par\noindent instead. Also your question has nothing to do with bibtex'. \\ is ok to be used inside tabular and similar environments but not to break text. Offtopic: Please consider about accepting the answer of your previous question – koleygr Sep 15 '18 at 23:34
• After replaced by \par\noindent, this waring is still there. I am thinking Is this because some characters in the text @koleygr – Erik Johnsson Sep 15 '18 at 23:40
• Anyway, this is not an error but a warning that the most of the times is nothing to worry about. But in your case comes from this behavior. Means that tex didn't found a perfect way to break the lines – koleygr Sep 15 '18 at 23:40

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\title{Test}
\author{None}
\begin{document}
\maketitle
\subsection*{2. P18. Exercise 3:}
Assume we have a fair eight-sided die with the numbers 1, 2, 3, 3, 4, 5, 5, 5 on its sides.
What is the probability that each of the numbers 1 through 5 will be rolled?
If we roll two of these dice, what is the range of possible totals of the values showing
on the two dice? What is the chance that each of the numbers in this range will be rolled?\par

\noindent Test
\end{document}


Then replace \par with \\ and compile again.

There is no warning in the first case in my version, but there is in second case.

\\` is something you have to avoid inside paragraphs of text. It is used inside tabulars or similar environments but not inside lines of text.

For more see here: https://tex.stackexchange.com/a/82666/120578

• It makes no sense to use \\ at the end of a paragraph. The "underfull \hbox" message is because TeX is trying to generate another line of text after the \\ but there is no text to generate. Using \\ inside a paragraph is valid, but it is rarely the best way to do whatever you are trying to do. – alephzero Sep 16 '18 at 8:28