![Por que a nota da mesa da minha mesa de três partes está descaradamente saliente? Como a largura pode ser ajustada (automaticamente) aqui?](https://rvso.com/image/266436/Por%20que%20a%20nota%20da%20mesa%20da%20minha%20mesa%20de%20tr%C3%AAs%20partes%20est%C3%A1%20descaradamente%20saliente%3F%20Como%20a%20largura%20pode%20ser%20ajustada%20(automaticamente)%20aqui%3F.png)
Por que a nota da mesa da minha mesa de três partes está descaradamente saliente? Como a largura pode ser ajustada (automaticamente) aqui?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabulary}
\usepackage{threeparttable}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{lipsum}
\renewcommand{\arraystretch}{1.2}
\sisetup{round-mode=places,round-precision=1, add-decimal-zero=true, add-integer-zero=true, round-integer-to-decimal}
\begin{document}
\lipsum[1]
\begin{table}
\centering
\begin{threeparttable}
\caption{Some long boring caption don't fall asleep 2013}
\begin{tabulary}{\textwidth}{@{}*{1}{l}*{2}{S[table-format=3.2]}@{}}
\toprule
& {incl.\ Ingredients A\tnote{1a}} & {excl.\ Ingredients A\tnote{1b}} \\
\midrule
DDDDDDDDDDD & 36.1 & 22.0\\
GGGGGGGGGGGG & 30.9 & 20.0\\
GGGG\tnote{2} & 33.0 & 22.8\\
OOOO\tnote{2} & 33.766 & 24.643
\\ \bottomrule
\end{tabulary}
\begin{tablenotes}
\item [2] Unweighted Average
\item [] Source: radiowaves from outer space 1999
\end{tablenotes}
\end{threeparttable}
\end{table}
\lipsum[2]
\end{document}
Responder1
\tnote
compõe seu argumento em uma caixa de largura zero, portanto não influenciará a composição dos dados. Essepodernão ser desejado em cabeçalhos ou descrições; você pode adicionar um comando que imite o trabalho, \tnote
mas use toda a largura.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabulary}
\usepackage{threeparttable}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{lipsum}
\renewcommand{\arraystretch}{1.2}
\sisetup{round-mode=places,
round-precision=1,
add-decimal-zero=true,
add-integer-zero=true,
round-integer-to-decimal}
% This is like `\tnote`, but uses the space of the argument
\newcommand\stnote[1]{\textsuperscript{\TPTtagStyle{#1}}}
\begin{document}
\lipsum[1]
\begin{table}[ht]
\centering
\begin{threeparttable}
\caption{Some long boring caption don't fall asleep 2013}
\begin{tabulary}{\textwidth}{@{} L *{2}{S[table-format=3.2]}@{}}
\toprule
& {incl.\ Ingredients A\stnote{1a}} & {excl.\ Ingredients A\stnote{1b}} \\
\midrule
DDDDDDDDDDD & 36.1 & 22.0 \\
GGGGGGGGGGGG & 30.9 & 20.0 \\
GGGG\tnote{2} & 33.0 & 22.8 \\
OOOO\tnote{2} & 33.766 & 24.643 \\
\bottomrule
\end{tabulary}
\begin{tablenotes}
\item [2] Unweighted Average
\item [] Source: radiowaves from outer space 1999
\end{tablenotes}
\end{threeparttable}
\end{table}
\lipsum[2]
\end{document}
Observe que para fazer algo sensato tabulary
você deve adicionar pelo menos uma "coluna de largura indeterminada", especificada com um caractere de LCRJ
cada uma denotando o alinhamento desejado nas células da coluna: alinhamento à esquerda (irregular à direita), centralização, alinhamento à direita ( irregular à esquerda), justificado.
Uma definição um pouco diferente que permite usar \stnote
na legenda sem que ela apareça na lista de tabelas: altere a definição de \stnote
com
\usepackage{etoolbox}
\makeatletter
\apptocmd{\TPT@begintabbox}{\let\mTPTprint\@firstofone}{}{}
\apptocmd{\threeparttable}{\let\mTPTprint\relax}{}{}
\newcommand\stnote[1]{\protect\mTPTprint{\textsuperscript{\TPTtagStyle{#1}}}}
\newcommand\mTPTprint[1]{}
\makeatother