0

I am trying to fit the following table into a page but \resizebox is changing the font size and is making it too small compared to the rest of the document.

Here is the code I am using with \resizebox:

\begin{table}
\centering
\resizebox{\textwidth}{!}{%
    \begin{tabular}{llcl}
        \toprule
        \multicolumn{1}{c}{\textbf{Region}} & \multicolumn{1}{c}{\textbf{\begin{tabular}[c]{@{}c@{}}Inferred by experiment\end{tabular}}}                                         & Protein1                                                              & \multicolumn{1}{c} protein2                            \\ \midrule
        &                                                                                                                                       & \multicolumn{2}{c}{\textbf{Structure at T0}}                                                                                                                               \\ \cline{3-4}
        &                                                                                                                                       & \multicolumn{1}{l}{{\color[HTML]{333333} \begin{tabular}[c]{@{}l@{}}F74, T75, E76, D77, M79, \textbf{\textcolor{red}{V80}}, P81, \textbf{\textcolor{red}{G83}}, L84, \\ T86, G87, Q88, A90, L91\end{tabular}}}                                                                                                                                                                   & \begin{tabular}[c]{@{}l@{}}V6, P7, G10, L11, L13, V14, L17, G18,\\ F20, M21, Y24 V26, R27, M79,\textbf{\textcolor{red}{V80}},\\ L82, \textbf{\textcolor{red}{G83}}, L84, Y85, T86, G87, A90  \end{tabular}                                                                        \\ \cline{3-4}
        &                                                                                                                                       & \multicolumn{2}{c}{\textbf{Equilibrated structures}}                                                                                                                                               \\ \cline{3-4}
        \multirow{-10}{*}{Protein interface}   & \multirow{-10}{*}{\begin{tabular}[c]{@{}l@{}}V80, G83, Q88, N92,\\ W93, W95, I98,\\ F100, G101, A102,\\ D111, V118\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M1, P2, S4, W5, P7, A8, G10, L11, T12,L13, V14, \\ P15, L17, G18, M21, G22, F25,V26, E29, Y34, \\ L37, K39, P40, R46, V67,W68, E70, L71, D77, \\ A78, M79, \textbf{\textcolor{red}{V80}}, P81,L82, \textbf{\textcolor{red}{G83}}, Y85, T86, G87, \end{tabular}} & \begin{tabular}[c]{@{}l@{}}S4, V6, P7, V9, G10, L11, T12, L13, V14,\\ P15, L17, G18, F20, M21, G22, Y24,\\ F25, V26, R27, G28, E29, G30, L31, R32  \end{tabular} 
        \\ \bottomrule
    \end{tabular}
}
\caption{Table} \end{table}

Here is what the table looks like:

enter image description here

I also tried using \begin{adjustbox}{width=\textwidth}, but it did not give the desired output. Any other suggestions? I appreciate your help.

egreg
  • 1,121,712
FZJ
  • 101

1 Answers1

2

Like this?

enter image description here

  • you not provide MWE (Minimal Working Example), a small but complete document with your table. Consequently your page layout is unknown.
  • To demonstrate, how you can set table, I use article documentclass and determine page layout with geometry package.
  • you can determine table width for example with tabular*, xtabular, tabularray packages ...
  • In MWE below is used tabularray package.
  • It is not entirely clear how should table looks, so in MWE is just guessing that you may you liked showed table design.
\documentclass{article}
\usepackage{geometry}
\usepackage[skip=0.33\baselineskip]{caption}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\newcommand\bfc[1]{\textbf{\textcolor{red}{#1}}}

\usepackage{lipsum}

\begin{document} \begin{table} \caption{Table} \label{tab:?} \begin{tblr}{colspec={@{} X[0.3,l] X[0.7, l] X[j] X[j] @{}}, row{1}={font=\bfseries,c,m} } \toprule Region & Inferred by experiment
& Protein 1
& Protein 2 \ \midrule \SetCell[r=4]{l} Protein interface & \SetCell[r=4]{l} V80, G83, Q88, N92, W93, W95, I98, F100, G101, A102, D111, V118 & \SetCell[c=2]{c, font=\bfseries} Structure at T0 & \ \midrule & & F74, T75, E76, D77, M79, \bfc{V80}, P81, \bfc{G83}, L84, T86, G87, Q88, A90, L91 & V6, P7, G10, L11, L13, V14, L17, G18, F20, M21, Y24 V26, R27, M79, \bfc{V80}, L82, \bfc{G83}, L84, Y85, T86, G87, A90 \ \midrule[dashed] & & \SetCell[c=2]{c, font=\bfseries} Equilibrated & \ \midrule & & M1, P2, S4, W5, P7, A8, G10, L11, T12,L13, V14, P15, L17, G18, M21, G22, F25,V26, E29, Y34, 37, K39, P40, R46, V67,W68, E70, L71, D77, A78, M79, \bfc{V80}, P81,L82, \bfc{G83}, Y85, T86, G87, & S4, V6, P7, V9, G10, L11, T12, L13, V14, P15, L17, G18, F20, M21, G22, Y24, F25, V26, R27, G28, E29, G30, L31, R32 \ \bottomrule \end{tblr} \end{table} \end{document}

Zarko
  • 296,517
  • Thanks a lot! This is exactly what I needed. – FZJ Sep 24 '22 at 12:01
  • @FZJ, you are welcome. If answer solve your problem, you may consider to accept it (by clicking on the check mark attop left side of the answer). – Zarko Sep 24 '22 at 15:21