Legenda do recorte de tabela com a própria tabela

Legenda do recorte de tabela com a própria tabela

Estou começando no LaTeX agora e tenho um problema com a legenda da minha tabela. Estou usando TabularX e a legenda está recortada com a própria tabela. Você poderia me ajudar? Obrigado! insira a descrição da imagem aqui

Lamento muito que a formatação do código não pareça funcionar, não sei por quê.

\documentclass[
    paper=a4,                           
    fontsize=11pt,                      
    parskip=half*,                      
    ]{scrartcl}                         

\begin{document}
    
\usepackage{tabularx}                   
\usepackage[labelfont={bf},             
            font={footnotesize},    
            labelsep=space,             
            format=hang,                    
            justification=raggedright,  
            singlelinecheck=false       
            ]{caption}              

\captionsetup[table]{aboveskip=5pt, belowskip=-5pt}


\begin{table}[!ht]
\small
    \centering
    \captionof{table}[RFA-Analyseergebnisse des ausgefilterten Feststoff (Partikelretention 8-15µm)]{RFA-Analyseergebnisse des ausgefilterten Feststoff (Partikelretention 8-15µm)}
    \begin{tabular}{ccccccccc}
    \hline
        \textbf{Al} & \textbf{Ni} & \textbf{Co} & \textbf{Mn} & \textbf{Cu} & \textbf{Fe} & \textbf{P} & \textbf{Ca} & \textbf{Si} \\ \hline
        10.49\% & 22.68\% & 11.74\% & 6.65\% & 1.29\% & 0.85\% & 0.79\% & 0.36\% & 0.22\% \\ \hline
    \end{tabular}
    \label{RFA_Filterkuchen_1}
\end{table}
    
\end{document}

Responder1

Além de se livrar da belowskip=-5ptopção questionável, você realmente deveria tentar dar à sua mesa uma “aparência” mais aberta e convidativa. Eu sugiro que você faça isso (a) usando as macros do booktabspacote para criar regras horizontais bem espaçadas, (b) nãoem negritoos itens na linha do cabeçalho (e empregar um pacote para mhchemcompor as equações químicas) e (c) mover o %símbolo comum das células de dados para a legenda.

Aliás, tendo em vista o fato da diretiva ocorrer dentro de um tableambiente, não está claro para mim por que você está usando \captionof{table}{...}em vez de apenas \caption{...}.

insira a descrição da imagem aqui

\documentclass[
    paper=a4,                           
    fontsize=11pt,                      
    parskip=half*,                      
    ]{scrartcl}                         

%\usepackage{tabularx} % does not appear to be needed                  
\usepackage[font={footnotesize}, % you sure about this?
            labelfont = bf,       
            labelsep  = space,             
            format    = hang,                    
            justification=raggedright,  
            singlelinecheck=false       
            ]{caption}              
\captionsetup[table]{skip=0.5\baselineskip}
     % {aboveskip=5pt, belowskip=-5pt} % huh?
\usepackage{siunitx,mhchem,booktabs}

\begin{document}
    
\begin{table}[htb]
    \centering
    \small
    \caption{RFA-Analyseergebnisse des ausgefilterten 
             Feststoffs (Partikelretention 
             8--15\,\unit{\micro\meter}), in \%}
    \label{RFA_Filterkuchen_1}
    
    \begin{tabular}{@{} *{9}{c} @{}}
    \toprule
    \ce{Al} & \ce{Ni} & \ce{Co} & \ce{Mn} & \ce{Cu} &
    \ce{Fe} & \ce{P}  & \ce{Ca} & \ce{Si}   \\ 
    \midrule
    10.49 & 22.68 & 11.74 & 6.65 & 1.29 & 
     0.85 &  0.79 &  0.36 & 0.22   \\ 
    \bottomrule
    \end{tabular}
\end{table}
    
\end{document}

Responder2

Eu acho que você deveria apenas alterar o belowskipparâmetro de -5ptpara 5pt. Porém, você pode usar apenas \captionpara a mesa. Além disso, eu recomendaria que você (como iniciante) usasse estesite de casamentopara criar tabelas com muita facilidade

insira a descrição da imagem aqui

\documentclass[
    paper=a4,                           
    fontsize=11pt,                      
    parskip=half*,                      
    ]{scrartcl}     

\usepackage{tabularx}                   
\usepackage[labelfont={bf},             
            font={footnotesize},    
            labelsep=space,             
            format=hang,                    
            justification=raggedright,  
            singlelinecheck=false       
            ]{caption}              

%\captionsetup[table]{aboveskip=5pt, belowskip=5pt} % <--           

\begin{document}
    



\begin{center}
\begin{table}[!ht]
\small
    
    \caption{RFA-Analyseergebnisse des ausgefilterten Feststoff (Partikelretention 8-15µm)}
        \begin{tabular}{ccccccccc}
        \hline
        \textbf{Al} & \textbf{Ni} & \textbf{Co} & \textbf{Mn} & \textbf{Cu} & \textbf{Fe} & \textbf{P} & \textbf{Ca} & \textbf{Si} \\ \hline
        10.49\% & 22.68\% & 11.74\% & 6.65\% & 1.29\% & 0.85\% & 0.79\% & 0.36\% & 0.22\% \\ \hline
        \end{tabular}
    \label{RFA_Filterkuchen_1}
\end{table}
\end{center}

\end{document}

Responder3

Com {NiceTabular}of nicematrixe sua chave integrada caption.

\documentclass[
    paper=a4,                           
    fontsize=11pt,                      
    parskip=half*,                      
    ]{scrartcl}                         

\usepackage{nicematrix,booktabs} 

\begin{document}

\begin{table}[!ht]
\small
    \centering
    \begin{NiceTabular}
     [ caption = { RFA-Analyseergebnisse des ausgefilterten Feststoff (Partikelretention 8-15µm) } ]
     {@{}ccccccccc@{}}
     \toprule
     \RowStyle[bold]{}
      Al & Ni & Co & Mn & Cu & Fe & P & Ca & Si \\
     \midrule
      10.49\% & 22.68\% & 11.74\% & 6.65\% & 1.29\% & 0.85\% & 0.79\% & 0.36\% & 0.22\% \\ 
     \bottomrule
    \end{NiceTabular}
    \label{RFA_Filterkuchen_1}
\end{table}
    
\end{document}

Saída do código acima

Responder4

Eu escreveria sua tabela da seguinte maneira:

  • para tabela use tabularraypacote com X[c]colunas
  • para regras de linhas de tabela do booktabspacote
  • na segunda linha eu escreveria os dados como quantidades propostas em siunitxpackage . Pacotes booktabse siunitxsão carregados como tabularraybibliotecas:
\documentclass[paper=a4,
               fontsize=11pt,
               parskip=half*,
               ]{scrartcl}
\usepackage[skip=1ex,
            font={footnotesize},
            labelfont=bf,
            labelsep=space,
            format=hang,
            justification=raggedright,
            singlelinecheck=false
            ]{caption}

\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}

\begin{document}
    \begin{table}[!ht]
    \centering
\caption{RFA-Analyseergebnisse des ausgefilterten Feststoff (Partikelretention 8-15µm)}
\label{RFA_Filterkuchen_1}
\begin{tblr}{colspec = { *{9}{X[c]} },
                 row{1}  = {font=\bfseries}
                }
    \toprule
A   &   Ni  &   Co  &   Mn  &   Cu  &   Fe  &   P   &   Ca  &   Si  \\
    \midrule
\qty{10.49}{\%} & \qty{22.68}{\%}   & \qty{11.74}{\%}   &  
 \qty{6.65}{\%} &  \qty{1.29}{\%}   & \qty{0.85}{\%}    &
 \qty{0.79}{\%} &  \qty{0.36}{\%}   & \qty{0.22}{\%}    \\
    \bottomrule
\end{tblr}
    \end{table}
\end{document}

insira a descrição da imagem aqui

informação relacionada