2

It seems to be a common question, but the other werent adressing my code.

\begin{table}[ht!]
\centering
\small
\caption{Absolute and relative frequencies } 
\label{FreqFair}
\renewcommand{\arraystretch}{1}
\setlength{\tabcolsep}{1pt}
\scalebox{1}{
\begin{tabular}{p{0.2\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.15\textwidth}p{0.1\textwidth}} \\ \toprule%{L C R} 
& \multicolumn{5}{c}{Stated importance} \\ 
&Very\linebreak important&Important&Moderately\linebreak important&Not\linebreak     important&Total \\ \midrule
\end{tabular}
}
\normalsize
\end{table}

I guess using the line break in the first row is not the best idea, but then it looks exactly how I want it.

lockstep
  • 250,273
Max M
  • 313

1 Answers1

5

If you replace the \linebreak macro calls with \newline-s, the bad boxes will go away. That's because the \linebreak command causes LaTeX to stretch the line so it extends to the right margin. And this can't be done by stretching the whitespaces only if you have one word...

Changing the alignment in the cells (eg. to \raggedright) could also remove the bad boxes.

(Thanks to @DavidCarlisle for pointing out how wrong I was.)

masu
  • 6,571