# Underfull \hbox (badness 10000) in paragraph despite using tabular in wizard

I've read the other topics on this but I really cannot understand why I'm getting it in my case when it has been made by the wizard rather than by hand. I have

\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{array}
\usepackage{enumitem}
\usepackage{amsthm}
\newtheorem*{eg}{Example}

\begin{document}
\begin{itemize}
\item[\textbf{4.}]
\end{itemize}
Let $A=[0,1] \setminus \mathbb{Q}$.\\
\\
\begin{tabular}{|l||l|l|l|l|l|}
\hline
space $X$ & $A^o$ & $\overline{A}$ & $\partial A$ & Is $A$ open? & Is $A$ closed? \\
\hline
$\mathbb{R}$ & $\varnothing$ & $[0,1]$ & $[0,1]$ & No & No \\
\hline
$\mathbb{R} \setminus \mathbb{Q}$ & $A$ & $A$ & $\varnothing$ & Yes & Yes \\
\hline
\end{tabular} \\
\\
For $X = \mathbb{R}$, $\partial A = \overline{A} \cap \overline{\mathbb{R} \setminus A} = [0,1] \cap \mathbb{R} = [0,1]$.\\
For $X = \mathbb{R} \setminus \mathbb{Q}$, $\partial A = A \cap ((\mathbb{R} \setminus \mathbb{Q})_{<0} \cup (\mathbb{R} \setminus \mathbb{Q})_{>1}) = \varnothing$.

\begin{itemize}
\item[\textbf{5.}]
\end{itemize}
Proofs are in the notes.

\end{document}

• Welcome to TeX.SX. Please provide a compilable version of your code, not just fragments. By the way: Perhaps you should use \begin{enumerate} \item ...\end{enumerate} instead of \item[\textbf{4.}] etc. – user31729 Feb 21 '16 at 16:50
• I hope the edit provided enough, and thanks for the suggestion. – user98928 Feb 21 '16 at 16:54
• the example produces the error ! LaTeX Error: Lonely \item--perhaps a missing list environment. you are missing an environment. – David Carlisle Feb 21 '16 at 16:55
• Please post an example that produces the underfull hbox warning in your question. (you can delete all parts of the example unrelated to that.) – David Carlisle Feb 21 '16 at 16:56
• Although I just made an edit, I was too slow so just rolled it back to your version. – user98928 Feb 21 '16 at 17:01

The underfull hbox warnings are due to

\\
\\


as this forces two linebreaks with nothing in between so the resulting line is "under full" and infinitely bad (badness 10000 being as bad as TeX can report).

You should avoid all use of \\ outside its use to end table rows.

This has no warnings:

\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{array}
\usepackage{enumitem}
\usepackage{amsthm}
\newtheorem*{eg}{Example}

\begin{document}

\setcounter{section}{3}
\section{}
Let $A=[0,1] \setminus \mathbb{Q}$.

\begin{tabular}{|l||l|l|l|l|l|}
\hline
space $X$ & $A^o$ & $\overline{A}$ & $\partial A$ & Is $A$ open? & Is $A$ closed? \\
\hline
$\mathbb{R}$ & $\varnothing$ & $[0,1]$ & $[0,1]$ & No & No \\
\hline
$\mathbb{R} \setminus \mathbb{Q}$ & $A$ & $A$ & $\varnothing$ & Yes & Yes \\
\hline
\end{tabular}

For $X = \mathbb{R}$, $\partial A = \overline{A} \cap \overline{\mathbb{R} \setminus A} = [0,1] \cap \mathbb{R} = [0,1]$.\\
For $X = \mathbb{R} \setminus \mathbb{Q}$, $\partial A = A \cap ((\mathbb{R} \setminus \mathbb{Q})_{<0} \cup (\mathbb{R} \setminus \mathbb{Q})_{>1}) = \varnothing$.

\section{}
Proofs are in the notes.

\end{document}