1

I have the problem that when my table gets too wide so that I have to resize it, the thickness of \toprule and \bottomrule won't show any more. When I zoom in I can see that there still is a thickness variation between \midrule and the ones mentioned above. So I guess the thickness of \toprule and \bottomrule is resized, too? Does anyone have a solution how one can resize a table AND have bold lines in the table?

\begin{table}[th]
\caption[Test]{Test.} \label{tab:Test}
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{lcccccccc} 
    \toprule
    {} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} & {TestTestTestTest} \\
    \midrule
    {TestTestTestTest}  & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & \multirow{2}{*}{1000}  & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & {} \\[-2mm]
    {TestTestTestTest}  & {} & {} & {}  & {} & {} & {} & {} & {} \\       
    \bottomrule
\end{tabular}}
\end{table}
5
  • 4
    only use \resizebox on tables at as a last resort and even then avoid doing it, there are always better ways. use a smaller font eg \small or use column types like p{2cm} rather than c so the text in the cells can linebreak Commented Jan 29, 2020 at 22:40
  • 1
    Using \resizebox to make the tabular material “fit” inside the width of the textblock is taking the sledgehammer approach. Why worry about the thickness of some horizontal lines if everything else in the table has experienced the equivalent of being smashed to pieces?
    – Mico
    Commented Jan 29, 2020 at 22:44
  • 1
    note you have not provided a usable example so it is not possible to suggest a suitable font or line breaking strategy Commented Jan 29, 2020 at 22:45
  • also preventing the float going on a float page makes it much more likely that that it goes to the end of the document. Commented Jan 29, 2020 at 22:47
  • 4
    This is the classical XY problem. What you should really ask is: My table doesn't fit; what are my options?
    – Fran
    Commented Jan 30, 2020 at 4:32

1 Answer 1

3

To long for the comment:

  • You really need to consider all comments below your question.
  • To solve your problem, you should consider to redesign your table. For example as shown in the following MWE (Minimal Working Example):
\documentclass{article}
\usepackage{booktabs, multirow, tabularx}

\begin{document}
\begin{table}[th]
\caption[Test]{Test.} \label{tab:Test}
\centering
\begin{tabularx}{\linewidth}{l XXX XXX XX}
    \toprule
    & Test Test Test Test   & Test Test Test Test   & Test Test Test Test 
    & Test Test Test Test   & Test Test Test Test   & Test Test Test Test 
    & Test Test Test Test   & Test Test Test Test   \\
    \midrule
TestTestTestTest  
    & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & \multirow{2}{*}{1000}  
    & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} & \multirow{2}{*}{1000} 
    & \multirow{2}{*}{1000} &                       \\
TestTestTestTest 
    &                       &                       &     
    &                       &                       &   
    &                       &                       \\
    \bottomrule
\end{tabularx}
\end{table}
\end{document}

which gives:

enter image description here

Above MWE is one of many possible solutions of your problem. Hopefully it will help you to rephrase your question and provide your MWE, which demonstrate your problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .