我的表格对于页面来说稍微有点太宽了。它包含表格注释\tnote{}
,这些注释使我的表格太宽了。现在,我从几个一起用于使复杂表格工作的软件包之一的文档中回忆起,其中一位作者添加了一个开关,以便将索引推入列间距。我知道我可以手动输入!{}
和@{}
键入说明符来尝试解决问题,但我认为有某种自动功能可以做到这一点。我正在使用这些与表格相关的软件包:siunitx, dcolumn, array, threeparttable, multirow, longtable, booktabs
并尝试在文档中找到该选项,但失败了。
有人能记得命令是什么吗?可能是表格序言中的内容。
谢谢。
编辑:这是一个例子(文档序言有点拗口,恐怕我只是复制并粘贴了它。):
\documentclass{article}
\usepackage{setspace}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[labelfont=bf]{caption}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage[sort]{cleveref}
\usepackage[online]{threeparttable}
\usepackage[output-complex-root=\text{\ensuremath{i}} % Says that I want italic maths i to signify imaginary components.
,load-configurations=abbreviations % Enables many abbreviations like \eV, however this has separate scope to doc wide macros.
,detect-weight % Detect the weighting (bold) of surrounding text.
,range-units=single % Can specify a range like 1 to 2eV or 1eV to 2eV. \SIrange{1}{2}{\eV}
,list-units=single % Same as range-units only for list. \SIlist{1;2;3;4}{\eV}
,table-alignment=center % Sets -number- -text- -unit- alignment to center unless superceeded in \sisetup{}.
% If not set, then numbers centered on radix. if set, must specify format for correct placement
,group-digits=false % separates digits into blocks of three (can change other settings to make it comma separated.
]{siunitx} % for proper typesetting of units, still under development as best as i can tell... I'm scared \si{} \SI{}{}
\begin{document}
\begin{table}
\begin{threeparttable}
\begin{tabular}{c c c c}
\toprule
things & more things & bumbily boo & Numbers \\
\midrule
1.23412435\tnote{a} & 123543124513452\tnote{b} & dogCatWolfSheep\tnote{c} & -2.1214153124\tnote{d} \\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}
答案1
在生成上述示例时,我意识到该\tnote
命令是三部分表包的一部分。我想要的命令是\TPTrlap
放在threeparttable
环境的可选参数中。来自手册:A command with one argument, to make notes go out of the column, into the column separation (for right-aligning)
。
进一步回答这个问题。我发现默认情况下会将列间距threeparttable
推\tnote{}
到列间距,在 siunitx S 列的情况下也会这样做。只需在参数中不提及表格注释的大小,table-align-text-post={a}
这将为非数字数据添加空间。它将允许注释进入列间距而不会产生 hbox 过满错误。