# How to disable / suppress bad box warnings within a longtable?

I have a quite long (3 pages) longtable in landscape and it is generating me a ton of bad box warnings (overfull \vbox and \hbox messages up to 30.0000pt too wide). But the table is perfectly fine for printing so I do not care about these messages at all. However I do care about them when they occur outside the table so I really hate it that this table spams my log and that I don't see the bad box messages I actually want to eliminate.

The tips I found so far don't seem to have any effect. Currently I have the following settings in my preamble:

\hbadness=10000
\vfuzz=30pt
\hfuzz=30pt


This is just for testing as I wanted to be sure to set the right option. Later I would like to set the working setting right before the table and clear it afterwards. The settings however have no effect in the table. But they are not ignored, when I create a overfull box outside the table on purpose it's warning is gone with these settings in the preamble...

So what can I do to get rid of those nasty warnings for the table?

Here is the code of a table like mine. My actual preamble is much longer and so my actual table looks a little different. With this example the problem also only exists for \hbox while in my actual table there are also bad \vbox warnings but I guess it is the same problem:

\documentclass[
12pt,
a4paper,
twoside,
BCOR12mm,
DIV14,
parskip=half,
bibliography=totoc,
listof=totoc,
numbers=noenddot,
appendixprefix,
abstracton,
pdftex
]{scrreprt}

%Testing to get rid of bad box warnings
\vfuzz=30pt
\hfuzz=30pt

\usepackage{pdflscape}
\usepackage{longtable, colortbl}
\usepackage{multicol, multirow}
\usepackage{tabularx}
\usepackage{array}
\usepackage{ragged2e}

\begin{document}

\begin{landscape}

% Change the footnote style to lowercase letters and ignore badness warnings
\renewcommand{\thefootnote}{\alph{footnote}}

\scriptsize
\begin{center}
\begin{longtable}{p{1.0in}p{1.0in}p{0.95in}lp{0.5in}lp{0.3in}l>{\RaggedRight\arraybackslash}p{1.0in}>{\RaggedRight\arraybackslash}p{1.0in}}
\caption[Table title]{Table title} \label{tab:market} \\

\hline \hline \\[-2ex]
\multicolumn{1}{c}{One} &
\multicolumn{1}{c}{Two} &
\multicolumn{1}{c}{Three} &
\multicolumn{1}{c}{Four$^a$} &
\multicolumn{1}{p{0.2in}}{Five (some words)$^b$} &
\multicolumn{1}{c}{Six$^c$} &
\multicolumn{1}{p{0.55in}}{Seven\-longerword} &
\multicolumn{1}{p{0.3in}}{Eight (some words)$^d$} &
\multicolumn{1}{c}{Nine} &
\multicolumn{1}{c}{Ten} \\[0.5ex] \hline \\[-1.8ex]

\multicolumn{10}{c}{{\tablename} \thetable{} -- continued} \\[0.5ex]
\hline \hline \\[-2ex]
\multicolumn{1}{c}{One} &
\multicolumn{1}{c}{Two} &
\multicolumn{1}{c}{Three} &
\multicolumn{1}{c}{Four$^a$} &
\multicolumn{1}{p{0.2in}}{Five (some words)$^b$} &
\multicolumn{1}{c}{Six$^c$} &
\multicolumn{1}{p{0.55in}}{Seven\-longerword} &
\multicolumn{1}{p{0.3in}}{Eight (some words)$^d$} &
\multicolumn{1}{c}{Nine} &
\multicolumn{1}{c}{Ten} \\[0.5ex] \hline \\[-1.8ex]

\multicolumn{10}{l}{{See next page\ldots}} \\
\endfoot

\\[-1.8ex] \hline \hline
\endlastfoot

%Data starts here:

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\
%And a lot more data...

\end{longtable}
\end{center}

% footnote a:
\footnotetext[1]{Footnote one}
% footnote b:
\footnotetext[2]{Footnote two}
% footnote c:
\footnotetext[3]{Footnote three}
% footnote d:
\footnotetext[4]{Footnote four}

\normalsize

% Reset the footnotes and badness
\renewcommand{\thefootnote}{\arabic{footnote}}

\end{landscape}

\end{document}

• Please make you code compilable by adding the usual niceties. This makes it easier for people to help you, increases your chances of getting fruitful responses and is generally appreciated as an act of courtesy. – cfr Feb 16 '14 at 2:50
• I spent 10 minutes and I can't get your code to compile cleanly. Of course, I'm guessing what your code is but there's the thing: I can't do anything but guess. – cfr Feb 16 '14 at 3:00
• Thanks for your effort, I haven't thought much about the code I posted. There were indeed some more packages involved than only longtable... I edited my post with an example code you should be able to simply copy and paste. – Jey DWork Feb 16 '14 at 4:06
• Not just that. Some of those commands are defined by other packages in ways which are incompatible. So the code breaks even once all the commands are defined. Also, the warnings are likely to be layout-dependent, I imagine... – cfr Feb 16 '14 at 4:09
• If you put draft into the class options, you can identify some of the problems. Why specify .5pt and then use .2pt in a multicolumn? That makes it look OK when really it is spilling outside. Also, you can specify possible hyphenation points e.g. longer\-word. But basically those warnings are coming from TeX. You can make things quieter in general but I don't think you can just silence warnings for a given patch of the file except by fixing the things TeX is unhappy about. (And, after all, it is because TeX gets unhappy that you use it, right?!) Maybe, you could compile the table standalone. – cfr Feb 16 '14 at 4:36

The following typesets with no warnings even if I comment out the block disabling warnings

%\hbadness=\maxdimen
%\vfuzz=30pt
%\hfuzz=30pt


In a column with a fixed with p{zz} theer is no point in having a multicolumn{1}{p{yy}} entry, if yy is less than xx it just forces the lines to break short and if it is more than zz then it forces the column to be wider, leaving the lines in every other entry breaking short. Also in columns specified to be less than an inch you want ragged setting.

\documentclass[
12pt,
a4paper,
twoside,
BCOR12mm,
DIV14,
parskip=half,
bibliography=totoc,
listof=totoc,
numbers=noenddot,
appendixprefix,
abstracton,
pdftex
]{scrreprt}

%Testing to get rid of bad box warnings

%\vfuzz=30pt
%\hfuzz=30pt

\usepackage{pdflscape}
\usepackage{longtable, colortbl}
\usepackage{multicol, multirow}
\usepackage{tabularx}
\usepackage{array}
\usepackage{ragged2e}

\begin{document}

\begin{landscape}

% Change the footnote style to lowercase letters and ignore badness warnings
\renewcommand{\thefootnote}{\alph{footnote}}

\scriptsize
\begin{center}
X\dotfill X

\begin{longtable}{
>{\RaggedRight\arraybackslash}p{.7in}
>{\RaggedRight\arraybackslash}p{.7in}
>{\RaggedRight\arraybackslash}p{.7in}
>{\RaggedRight\arraybackslash}p{0.7in}
>{\RaggedRight\arraybackslash}p{0.5in}
>{\RaggedRight\arraybackslash}p{0.3in}
>{\RaggedRight\arraybackslash}p{0.7in}
>{\RaggedRight\arraybackslash}p{.7in}
>{\RaggedRight\arraybackslash}p{1in}
>{\RaggedRight\arraybackslash}p{1in}}
\caption[Table title]{Table title} \label{tab:market} \\

\hline \hline \\[-2ex]
\multicolumn{1}{c}{One} &
\multicolumn{1}{c}{Two} &
\multicolumn{1}{c}{Three} &
\multicolumn{1}{c}{Four$^a$} &

Five (some words)$^b$ &
\multicolumn{1}{c}{Six$^c$} &
\hspace*{0pt}Seven\-longer\-word &
Eight (some words)$^d$ &
\multicolumn{1}{c}{Nine} &
\multicolumn{1}{c}{Ten} \\[0.5ex] \hline \\[-1.8ex]

\multicolumn{10}{c}{{\tablename} \thetable{} -- continued} \\[0.5ex]
\hline \hline \\[-2ex]
\multicolumn{1}{c}{One} &
\multicolumn{1}{c}{Two} &
\multicolumn{1}{c}{Three} &
\multicolumn{1}{c}{Four$^a$} &
Five (some words)$^b$ &
\multicolumn{1}{c}{Six$^c$} &
\hspace*{0pt}Seven\-longer\-word &
Eight (some words)$^d$ &
\multicolumn{1}{c}{Nine} &
\multicolumn{1}{c}{Ten} \\[0.5ex] \hline \\[-1.8ex]

\multicolumn{10}{l}{{See next page\ldots}} \\
\endfoot

\\[-1.8ex] \hline \hline
\endlastfoot

%Data starts here:

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\

One (some words) & Two (some words) & Three (some words) & Four & Five & Six & Seven & Eight & Nine: Here comes a short text & Ten: Here comes a short text \\
%And a lot more data...

\end{longtable}
\end{center}

% footnote a:
\footnotetext[1]{Footnote one}
% footnote b:
\footnotetext[2]{Footnote two}
% footnote c:
\footnotetext[3]{Footnote three}
% footnote d:
\footnotetext[4]{Footnote four}

\normalsize

% Reset the footnotes and badness
\renewcommand{\thefootnote}{\arabic{footnote}}

\end{landscape}

\end{document}
`