Is there a way to fix extremely wide tables?
I have the following table:
\begin{tabular}{lllll}
\toprule
& Manual Tests & Randoop 2.5 Minutes With GUI Code & Randoop 2.5 Minutes Without GUI Code & Randoop 5 Minutes Without GUI Code \\ \midrule
\% Covered Instructions & \textbf{82.40\%} & 21.25\% & 21.30\% & \textbf{22.10\%} \\ \bottomrule
\end{tabular}
And it looks like so:
Is there a way to make the cells slimmer? If relevant I am using scrreprt
.
Best Answer
You can use
p{width}
column type for a fixed column, text will wrap automatically. For example:You can also use
\shortstack
and use\\
for manual line break. For example:\shortstack
here can be replaced by a smalltabular
envronment, for better vertical alignment:Furthermore, you can use
makecell
package for more flexible commands.\shortstack
or\minitab
can be replaced by\makecell
,\thead
etc.