Ajude a consertar uma mesa

Ajude a consertar uma mesa

Tentei usar um modelo que funciona bem para uma tabela mais numérica, mas criei um monstro tentando adaptá-lo às novas necessidades. Aqui está o mwe:

\documentclass[a4paper, 11pt]{scrreprt}
\usepackage{amsmath,booktabs,siunitx}
\usepackage[version=4]{mhchem}  
\sisetup{separate-uncertainty}

\newcommand{\tabhead}[1]{%
    \smash[b]{%
        \begin{tabular}[t]{@{}c@{}}#1\end{tabular}%
    }%
}

\begin{document}

\begin{table}[h]

    \caption{Caption here.}\label{whatever}

    \setlength{\tabcolsep}{0pt}

    \begin{tabular*}{\linewidth}{
            @{\extracolsep{\fill}}
            r
            S[table-format=2.1]
            r
            S[table-format=1.2]
            r
            S[table-format=4.0]
            r
            r
        }
        \toprule
        {\textbf{Material} } &
        {\tabhead{ \textbf{Mean Pore Radius} \\ \textbf{(\si{\nano\meter})}}} &
        { \textbf{Model}} &
        {\tabhead{\textbf{Salt Concentration} \\ \textbf{({M} \ce{NaCl})}}} &
        {\textbf{pH}} &
        {\textbf{Buffer}} &
        {\tabhead{Range of Dextrans \\ \textbf{(kDa)}}} &
        {\tabhead{Reference \\ \textbf{(--)}}} \\
        &&&  \\
        \midrule
        LongName AA         &   18.4 & Simple model   &   0   & 20 mM Bis-Tris          &   6.5     &   0.18 to 500      &  [1,2]   \\ 
        LongName AA         &   25.8 & complex model  & 0.12  &  10 mM Tris-\ce{HCl}    &   7.2     & 0.18 to 20000      &  [3] \\  
        AA LongName  AA     &   15.0 & complex model  & 1     &  10 mM phosphate        &   8.0     &  4 to 400          &  [4,2]\\ 

        \bottomrule
    \end{tabular*}
    \label{}

\end{table}

\end{document}

Ele compila sem erros mas por um lado não cabe na página então não consigo ver a tabela inteira, e tem muitas outras coisas erradas como:

  • os cabeçalhos se sobrepõem. Não há distância adequada entre os títulos.
  • Como organizar os elementos justificados à direita, mas centralizando o cabeçalho?
  • devo usar tabularx nesta situação?

Qualquer ajuda é apreciada!

Responder1

Há pouca esperança de fazer com que esses cabeçalhos longos caibam no limite de páginas. Sugiro usar siglas explicadas logo abaixo da tabela (ou na legenda, talvez).

\documentclass[a4paper, 11pt]{scrreprt}
\usepackage{amsmath,booktabs,siunitx}
\usepackage[version=4]{mhchem}  
\sisetup{separate-uncertainty}

\begin{document}

\begin{table}[htp]

\caption{Caption here.}\label{whatever}

\setlength{\tabcolsep}{0pt}

\footnotesize

\begin{tabular*}{\linewidth}{
  @{\extracolsep{\fill}}
  l
  S[table-format=2.1]
  l
  S[table-format=1.2]
  l
  S[table-format=1.1]
  l
  r
}
\toprule
\textbf{Material} & {\textbf{MPR}} & \multicolumn{1}{c}{\textbf{Model}} & {\textbf{SC}} &
\multicolumn{1}{c}{\textbf{pH}} & {\textbf{B}} & \textbf{RD} & \textbf{Ref.} \\
\midrule
LongName AA    & 18.4 & Simple model  & 0    & 20 mM Bis-Tris      & 6.5 & 0.18 to 500   &  [1,2] \\ 
LongName AA    & 25.8 & complex model & 0.12 & 10 mM Tris-\ce{HCl} & 7.2 & 0.18 to 20000 &  [3] \\  
AA LongName AA & 15.0 & complex model & 1    & 10 mM phosphate     & 8.0 & 4 to 400      &  [4,2] \\ 
\midrule[\heavyrulewidth]
\end{tabular*}
\begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}lll}
MPR: Mean Pore Radius (\si{\nano\meter}) &
SC: Salt Concentration (M \ce{NaCl}) &
B: Buffer \\
RD: Range of Dextrans (kDa) & Ref.: Reference
\end{tabular*}

\end{table}

\end{document}

Sem \footnotesizeas colunas ficaria muito espremido. Dependendo da largura do texto, \smallpode servir.

insira a descrição da imagem aqui

informação relacionada