0

How to resize subtable inside of resizebox? I want to have three-tables side-by-side. However, each table is too wide, so I am using \resizebox. I realized that I need to set the width of subtable, where the effect of the \resizebox is not there. How can we set some sort of relative width?

\begin{table*}
\resizebox{\linewidth}{!}{
  \begin{subtable}[h]{XXX} % how to set XXX?
  \caption{$M=14$}
    \begin{tabular}{r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r}
       % stuff
    \end{tabular}
  \end{subtable}

\begin{subtable}[h]{XXX} % how to set XXX? \caption{$M=14$} \begin{tabular}{r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r} % stuff \end{tabular} \end{subtable}

\begin{subtable}[h]{XXX} % how to set XXX? \caption{$M=14$} \begin{tabular}{r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r} % stuff \end{tabular} \end{subtable}

} \end{table*}

Bernard
  • 271,350
mallea
  • 101
  • 1
    don't use \resizebox to fit a tabular, you will get uneven font sizes and it simply looks bad. Set the fontsize instead, e.g. with \footnotesize – Ulrike Fischer Oct 26 '20 at 11:57
  • Don't use resizebox to make sure a table fits into the available space as this will only lead to inconsistent font sizes throughout your document. There are better ways, some of which are listed here: My table doesn't fit; what are my options? If you provide a complete minimal working example (MWE) including some representative example contents in the tables, we could make some alternative suggestions on how to make the tables fit. – leandriis Oct 26 '20 at 11:58
  • 2
    Having had a closer look at your table code: Do you really expect three tables with 16 columns each to fit side by side into the textwidth? Even if the contents of each cell are exceptionally short I don*t think you can squeeze the tables into the textwidth while still keeping them at a readable font size. – leandriis Oct 26 '20 at 12:44

0 Answers0