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.

4
  • Welcome to TeX. SE! Please provide complete small document with your table. We need to know your page layout. Commented Sep 21, 2022 at 13:56
  • 1
    You could just reduce the width of the columns, see this answer. Commented Sep 21, 2022 at 13:59
  • Unrelated: Don't use \cline when you're already using the booktabs rules. Use \cmidrule instead, then you get better space around those lines. Commented Sep 21, 2022 at 14:03
  • You might want to change "lare" in the title to "large". Commented Sep 21, 2022 at 19:42

1 Answer 1

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} 
2
  • Thanks a lot! This is exactly what I needed. Commented Sep 24, 2022 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). Commented Sep 24, 2022 at 15:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.