我有下表:
\documentclass[border=3mm]{standalone}
\usepackage{graphicx}
\usepackage{booktabs,multirow}
\usepackage{siunitx}
\usepackage{stackengine}
\begin{document}
\begin{table}[h!]
\begin{center}
\resizebox{\textwidth}{!} {
\begin{tabular}{cc*{2}{S[table-format=-1.3]}
S[table-format= 1.3]
S
S[table-format=-1.3]
S[table-format= 3.3]
S[table-format= 1.3]}
\toprule
& {\stackon{}{$\mathbf{T^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^y_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^{z\vphantom{y}}_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^y_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^{z\vphantom{y}}_{EO}}$}}
& {\stackon{[px]}{\textbf{RMS}\vphantom{y}}} \\
\midrule
\multirow{4}{*}{\rotatebox[origin=c]{90}{P\textit{n}P-LM}}
& A & 2.748 & -0.135 & 2.175 & 119.232 & 1.368 & -76.261 & 0.240\\
& B & 2.690 & 0.768 & 2.128 & 124.905 & -1.972 & -91.559 & 0.247\\
& C & -1.576 & 1.139 & 2.146 & 120.264 & 1.428 & 98.205 & 0.255\\
& D & -1.575 & -0.122 & 2.165 & 119.634 & -0.818 & 85.313 & 0.231\\
\midrule
\multirow{4}{*}{\rotatebox[origin=c]{90}{EP\textit{n}P}}
& A & 2.722 & -0.161 & 2.345 & 121.639 & 1.828 & -75.974 & 0.463\\
& B & 2.649 & 0.729 & 2.259 & 127.082 & -0.881 & -91.444 & 0.432\\
& C & -1.565 & 1.148 & 2.246 & 121.639 & 1.250 & 98.377 & 0.389\\
& D & -1.547 & -0.077 & 2.238 & 120.951 & 0.199 & 85.428 & 0.372\\
\bottomrule
\end{tabular}
}
\end{center}
\caption{Exterior orientation parameters and corresponding RMS error for all Kinect sensors defined within the chessboard coordinate system.}
\label{tab:rigidParams}
\end{table}
\end{document}
尽管它位于文本宽度之内,但它会给我一个过满警告。我想知道为什么。
答案1
溢出的框来自倒数第二列中的减号。我通过\showoutput
向原始文件添加(使用article
class 而不是standalone
,因为后者给出了编译错误)来检测这一点。您只是在列的格式规范中漏掉了减号;应该是
S[table-format=-3.3]
而不是S[table-format= 3.3]
。
\documentclass{article}
\usepackage{graphicx}
\usepackage{booktabs,multirow}
\usepackage{siunitx}
\usepackage{stackengine}
\begin{document}
\begin{table}[h!]
\begin{center}
\resizebox{\textwidth}{!} {
\begin{tabular}{cc*{2}{S[table-format=-1.3]}
S[table-format= 1.3]
S
S[table-format=-1.3]
S[table-format=-3.3]
S[table-format=1.3]}
\toprule
& {\stackon{}{$\mathbf{T^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^y_{EO}}$}}
& {\stackon{[m]}{$\mathbf{T^{z\vphantom{y}}_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^{x\vphantom{y}}_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^y_{EO}}$}}
& {\stackon{[deg]}{$\mathbf{R^{z\vphantom{y}}_{EO}}$}}
& {\stackon{[px]}{\textbf{RMS}\vphantom{y}}} \\
\midrule
\multirow{4}{*}{\rotatebox[origin=c]{90}{P\textit{n}P-LM}}
& A & 2.748 & -0.135 & 2.175 & 119.232 & 1.368 & -76.261 & 0.240\\
& B & 2.690 & 0.768 & 2.128 & 124.905 & -1.972 & -91.559 & 0.247\\
& C & -1.576 & 1.139 & 2.146 & 120.264 & 1.428 & 98.205 & 0.255\\
& D & -1.575 & -0.122 & 2.165 & 119.634 & -0.818 & 85.313 & 0.231\\
\midrule
\multirow{4}{*}{\rotatebox[origin=c]{90}{EP\textit{n}P}}
& A & 2.722 & -0.161 & 2.345 & 121.639 & 1.828 & -75.974 & 0.463\\
& B & 2.649 & 0.729 & 2.259 & 127.082 & -0.881 & -91.444 & 0.432\\
& C & -1.565 & 1.148 & 2.246 & 121.639 & 1.250 & 98.377 & 0.389\\
& D & -1.547 & -0.077 & 2.238 & 120.951 & 0.199 & 85.428 & 0.372\\
\bottomrule
\end{tabular}
}
\end{center}
\caption{Exterior orientation parameters and corresponding RMS error for all Kinect sensors defined within the chessboard coordinate system.}
\label{tab:rigidParams}
\end{table}
\end{document}