你能帮我用幂数进行十进制对齐吗?提前谢谢
\documentclass{article}
\usepackage{multirow}
\usepackage{rccol}
\rcDecimalSign{.}
\usepackage{amsmath,bm,adjustbox}
\def\MC#1{\multicolumn{1}{c}{#1}}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\begin{document}
\begin{table*}[h!]
\caption{Results with different numerical schemes for the simple Cartesian trajectory}
\label{Table:02}
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{cccR{2}{2}ccccc} \hline
Radius of platforms \\ Vs Limb lengths & Numerical Scheme & & \MC{} & & Errors & & & \\ \cline{4-9}
& & & \MC{$\pmb{g}_x[\rm{mm}]$} & $\pmb{g}_y[\rm{mm}]$ & $\pmb{g}_z[\rm{mm}]$ & $\pmb{g}_{\psi}[^{\circ}]$ & $\pmb{g}_{\theta}[^{\circ}]$ & $\pmb{g}_{\phi}[^{\circ}]$ \\ \hline
\\
$\mathbf {1:1}$ & Constant Jacobian & max & 0.011 & 0.208 & $0.431$ & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\
$\sigma_{max}$ (1.08) & Updated Jacobian & max & 0.00 & $2.9\cdot{10^{-4}}$ & $7.1\cdot{10^{-4}}$& $4.3\cdot{10^{-6}}$ & $2.4\cdot{10^{-5}}$& $3.8\cdot{10^{-6}}$ \\
& & min & -0.00 & $-2.9\cdot{10^{-4}}$ & $-5.6\cdot{10^{-4}}$ & $-4.3\cdot{10^{-6}}$ & $-2.4\cdot{10^{5}}$ & $-3.8\cdot{10^{-6}}$ \\
$\sigma_{min}$ (0.54) & Newton-Raphson Method & max & $2.3\cdot{10^{-14}}$ & $1.1\cdot{10^{-9}}$ & $7.9\cdot{10^{-10}}$ & $1.0\cdot{10^{-12}}$ & $4.1\cdot{10^{-12}}$ & $2.7\cdot{10^{-13}}$ \\
& & min &$-3.5\cdot{10^{-9}}$ & $-1.1\cdot{10^{-9}}$ & $-1.3\cdot{10^{-9}}$ & $-1.0\cdot{10^{-12}}$ & $-1.6\cdot{10^{-14}}$ & $-2.8\cdot{10^{-13}}$\\ \hline
\\
$\mathbf {1:2}$ & Constant Jacobian & max & 0.012 & 0.397& $0.847$ & 0.008& 0.039 & 0.006 \\
& & min &$-2.396$ & -0.397& -0.448 & -0.008 & -0.045 & -0.006
\\
$\sigma_{max}$ (1.65) & Updated Jacobian & max & $5.3\cdot{10^{-6}}$ & $1.3\cdot{10^{-4}}$ & $2.9\cdot{10^{-4}}$ & $3.9\cdot{10^{-6}}$ & $1.7\cdot{10^{-5}}$& $3.1\cdot{10^{-6}}$ \\
& & min & -0.001 & $-1.4\cdot{10^{-4}}$ & $-2.1\cdot{10^{-1}}$ & $-3.9\cdot{10^{6}}$ & $-1.8\cdot{10^{-5}}$ & $-3.1\cdot{10^{-6}}$\\
$\sigma_{min}$ (0.44) & Newton-Raphson Method &max & $3.9\cdot{10^{-14}}$ & $4.7\cdot{10^{-10}}$ & $2.7\cdot{10^{-10}}$ & $5.9\cdot{10^{-13}}$ & $8.5\cdot{10^{-13}}$ & $1.9\cdot{10^{-13}}$ \\
& &min & $-2.6\cdot{10^{-10}}$ & $-4.8\cdot{10^{-10}}$ & $-6.8\cdot{10^{-10}}$ & $-6.0\cdot{10^{-13}}$ & $-3.9\cdot{10^{-14}}$ & $-1.8\cdot{10^{-13}}$ \\ \hline
\\
$\mathbf{1:3}$ & Constant Jacobian & max & 0.011 & 0.208 &$0.431$ & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & $-0.223$ & -0.007 & -0.035 & -0.006 \\
$\sigma_{max}$ (2.34) & Updated Jacobian & max & $4.8\cdot{10^{-6}}$ & $7.1\cdot{10^{-5}}$ & $1.5\cdot{10^{-4}}$ & $3.62\cdot{10^{-6}}$ & $1.3\cdot{10^{-5}}$ & $3.1\cdot{10^{-6}}$ \\
& & min & $-7.3\cdot{10^{-4}}$ & $-7.1\cdot{10^{-5}}$ & $-1.0\cdot{10^{-4}}$ & $-3.6\cdot{10^{-6}}$ & $-1.4\cdot{10^{-5}}$ & $-3.1\cdot{10^{-6}}$ \\
$\sigma_{min}$ (0.43) & Newton-Raphson Method & max & $2.8\cdot{10^{-14}}$ & $2.1\cdot{10^{-10}}$ & $1.17\cdot{10^{-10}}$ & $1.03\cdot{10^{-9}}$ & $2.8\cdot{10^{-13}}$ & $1.4\cdot{10^{-13}}$\\
& &min & $-2.1\cdot{10^{-9}}$ & $-2.2\cdot{10^{-10}}$ & $-3.1\cdot{10^{-10}}$ & $-1.0\cdot{10^{-9}}$ & $-5.2\cdot{10^{-14}}$ & $-1.2\cdot{10^{-13}}$\\ \hline
\end{tabular}
\end{adjustbox}
\end{table*}
\end{document}
答案1
像这样?
我建议使用S
中的列类型siunitx
,所有单位也都使用它,水平线使用 booktabs
。对于表格环境,这tabularx
似乎是比使用更好的解决方案tabular
,然后将其挤压到文本宽度:
\documentclass[twocolumn]{article}
%\usepackage{rccol}
%\rcDecimalSign{.}
\usepackage{amsmath,bm}
\usepackage{adjustbox}
%\def\MC#1{\multicolumn{1}{c}{#1}}
\usepackage{array, booktabs, multirow, tabularx}
\usepackage{siunitx}
\begin{document}
\begin{table*}
\caption{Results with different numerical schemes for the simple Cartesian trajectory}
\label{Table:02}
%\begin{adjustbox}{max width=\textwidth}
\small
\setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{@{} >{\hsize=1.3\hsize}X
>{\hsize=0.7\hsize}X
c
*{6}{S[table-format=-1.1,
table-figures-exponent=2,
exponent-product = \cdot,
table-sign-exponent
]}
@{}}
\toprule
\multirow{2}{=}[-0.5ex]{Rad. of platforms vs Limb lengths}
& \multirow{2}{=}[-0.5ex]{Numerical Scheme}
& & \multicolumn{6}{c}{Errors} \\
\cmidrule(lr){4-9}
& & & {$\pmb{g}_x$ [mm]}
& {$\pmb{g}_y$ [mm]}
& {$\pmb{g}_z$ [mm]}
& {$\pmb{g}_{\psi}$ [\si{\degree}]}
& {$\pmb{g}_{\theta}$ [\si{\degree}]}
& {$\pmb{g}_{\phi}$ [\si{\degree}]} \\
\midrule
\multirow{2}{=}{$\mathbf{1:1}$}
& \multirow{2}{=}{Constant Jacobian}
& max & 0.011 & 0.208 & 0.431 & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\
\addlinespace
\multirow{2}{=}{$\sigma_{max}$ (1.08)}
& \multirow{2}{=}{Updated Jacobian}
& max & 0.00 & 2.9e-4 & 7.1e-4 & 4.3e-6 & 2.4e-5 & 3.8e-6 \\
& & min & -0.00 & -2.9e-4 & -5.6e-4 & -4.3e-6 & -2.4e5 &-3.8e-6 \\
\addlinespace
\multirow{2}{=}{$\sigma_{min}$ (0.54)}
& \multirow{2}{=}{Newton-Raphson}
& max & 2.3e-14 & 1.1e-9 & 7.9e-10 & 1.0e-12 & 4.1e-12 & 2.7e-13 \\
& & min &-3.5e-9 &-1.1e-9 & -1.3e-9 & -1.0e-12 & -1.6e-14 & -2.8e-13 \\ \midrule
\end{tabularx}
% \end{adjustbox}
\end{table*}
\end{document}
答案2
随意缩放表格应该是最后的手段。最好尝试最大限度地压缩它,使用缩写来表示较大的重复位:
\documentclass{article}
\usepackage{amsmath,bm}
\usepackage{array}
\usepackage{siunitx}
\usepackage{booktabs}
\begin{document}
\begin{table*}[h!]
\newcommand{\G}[2]{{$\bm{g}_{#1}$ (\si{#2})}} % temporary for the table
\newcommand{\CJ}{CJ}
\newcommand{\UJ}{UJ}
\newcommand{\NRM}{NR}
\newcommand{\smax}[1]{$\sigma_{\max}$ (#1)}
\newcommand{\smin}[1]{$\sigma_{\min}$ (#1)}
\newcommand{\rt}[1]{$\mathbf{#1}$}
\sisetup{output-exponent-marker=\ensuremath{\mathrm{E}}}
\caption{Results with different numerical schemes for the simple Cartesian trajectory}
\label{Table:02}
\scriptsize
\setlength{\tabcolsep}{2.4pt}
\begin{tabular}{
@{}
l c l
*{6}{S[table-format=-1.2e1]}
@{}
}
\toprule
(a) & (b)
& & \multicolumn{6}{c}{Errors} \\
\cmidrule(l){4-9}
& & & \G{x}{mm} & \G{y}{mm} & \G{z}{mm} &
\G{\psi}{\degree} & \G{\theta}{\degree}& \G{\phi}{\degree} \\
\midrule
\rt{1:1} & \CJ & max & 0.011 & 0.208 & 0.431 & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\
\smax{1.08} & \UJ & max & 0.00 & 2.9e-4 & 7.1e-4 & 4.3e-6 & 2.4e-5 & 3.8e-6 \\
& & min & -0.00 & -2.9e-4 & -5.6e-4 & -4.3e-6 & -2.4e5 & -3.8e-6 \\
\smin{0.54} & \NRM & max & 2.3e-14 & 1.1e-9 & 7.9e-10 & 1.0e-12 & 4.1e-12 & 2.7e-13 \\
& & min & -3.5e-9 & -1.1e-9 & -1.3e-9 & -1.0e-12 & -1.6e-14 & -2.8e-13 \\
\midrule
\rt{1:2} & \CJ & max & 0.012 & 0.397 & 0.847 & 0.008 & 0.039 & 0.006 \\
& & min & -2.396 & -0.397 & -0.448 & -0.008 & -0.045 & -0.006 \\
\smax{1.65} & \UJ & max & 5.3e-6 & 1.3e-4 & 2.9e-4 & 3.9e-6 & 1.7e-5 & 3.1e-6 \\
& & min & -0.001 & -1.4e-4 & -2.1e-1 & -3.9e6 & -1.8e-5 & -3.1e-6 \\
\smin{0.44} & \NRM & max & 3.9e-14 & 4.7e-10 & 2.7e-10 & 5.9e-13 & 8.5e-13 & 1.9e-13 \\
& & min & -2.6e-10 & -4.8e-10 & -6.8e-10 & -6.0e-13 & -3.9e-14 & -1.8e-13 \\
\midrule
\rt{1:3} & \CJ & max & 0.011 & 0.208 & 0.431 & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\
\smax{2.34} & \UJ & max & 4.8e-6 & 7.1e-5 & 1.5e-4 & 3.62e-6 & 1.3e-5 & 3.1e-6 \\
& & min & -7.3e-4 & -7.1e-5 & -1.0e-4 & -3.6e-6 & -1.4e-5 & -3.1e-6 \\
\smin{0.43} & \NRM & max & 2.8e-14 & 2.1e-10 & 1.17e-10 & 1.03e-9 & 2.8e-13 & 1.4e-13 \\
& & min & -2.1e-9 & -2.2e-10 & -3.1e-10 & -1.0e-9 & -5.2e-14 & -1.2e-13 \\
\midrule[\heavyrulewidth]
\multicolumn{9}{@{}l@{}}{\footnotesize\strut (a): Radius of platforms vs. limb lengths} \\
\multicolumn{9}{@{}l@{}}{\footnotesize\strut (b): Numerical Scheme} \\
\multicolumn{9}{@{}l@{}}{\footnotesize\strut \CJ: Constant Jacobian, \UJ: Updated Jacobian,
\NRM: Newton-Raphson Method}
\end{tabular}
\end{table*}
\end{document}
根据实际文档的文本宽度,您可以放大表格。我使用x.yEz
科学计数法,因为它比“乘以 10 at”更节省空间。
答案3
这是一个使用dcolumn
包来实现小数点对齐的解决方案。它还使用环境tabular*
而不是tabular
,并且它设法排版整个表格,而不必求助于缩小字体大小。而且,由于您已经加载了包bm
,因此它在各个地方使用\bm
而不是\pmb
。
\documentclass[twocolumn]{article}
\usepackage{amsmath,bm,ragged2e,siunitx,booktabs,dcolumn}
\def\MC#1{\multicolumn{1}{c}{#1}}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}
\newcommand{\mytab}[1]{\smash[b]{\begin{tabular}[t]{@{}l@{}} #1 \end{tabular}}}
\newcommand\mycdot{\mkern1mu{\cdot}\mkern1mu}
\begin{document}
\begin{table*}[h!]
%\small
\caption{Results with different numerical schemes for the simple Cartesian trajectory}
\label{Table:02}
\medskip
\setlength\tabcolsep{0pt} % let LaTeX figure out amount of intercolumn whitespace
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lll *{5}{d{2.6}} d{2.7} }
\toprule
\mytab{Radius of\\platforms vs\\limb lengths} &
\mytab{Numerical\\Scheme} & & \multicolumn{6}{c}{Errors} \\
\cmidrule(l){4-9}
& & &
\MC{$\bm{g}_x$ [\si{\milli\meter}]} & \MC{$\bm{g}_y$ [\si{\milli\meter}]} &
\MC{$\bm{g}_z$ [\si{\milli\meter}]} & \MC{$\bm{g}_{\psi}$ [\si{\celsius}]} &
\MC{$\bm{g}_{\psi}$ [\si{\celsius}]} & \MC{$\bm{g}_{\psi}$ [\si{\celsius}]}
\\ \addlinespace\addlinespace
\midrule
\textbf{1 : 1} & \mytab{Constant\\Jacobian} & max & 0.011 & 0.208 & 0.431 & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\ \addlinespace
$\sigma_{\max}$ (1.08) & \mytab{Updated\\Jacobian} & max & 0.00 & 2.9\mycdot10^{-4} & 7.1\mycdot10^{-4}& 4.3\mycdot10^{-6} & 2.4\mycdot10^{-5}& 3.8\mycdot10^{-6} \\
& & min & -0.00 & -2.9\mycdot10^{-4} & -5.6\mycdot10^{-4} & -4.3\mycdot10^{-6} & -2.4\mycdot10^{5} & -3.8\mycdot10^{-6} \\ \addlinespace
$\sigma_{\min}$ (0.54) & \mytab{N-R\\Method} & max & 2.3\mycdot10^{-14} & 1.1\mycdot10^{-9} & 7.9\mycdot10^{-10} & 1.0\mycdot10^{-12} & 4.1\mycdot10^{-12} & 2.7\mycdot10^{-13} \\
& & min &-3.5\mycdot10^{-9} & -1.1\mycdot10^{-9} & -1.3\mycdot10^{-9} & -1.0\mycdot10^{-12} & -1.6\mycdot10^{-14} & -2.8\mycdot10^{-13}\\
\midrule
\textbf{1 : 2} & \mytab{Constant\\Jacobian} & max & 0.012 & 0.397& 0.847 & 0.008& 0.039 & 0.006 \\
& & min &-2.396 & -0.397& -0.448 & -0.008 & -0.045 & -0.006 \\ \addlinespace
$\sigma_{\max}$ (1.65) & \mytab{Updated\\Jacobian} & max & 5.3\mycdot10^{-6} & 1.3\mycdot10^{-4} & 2.9\mycdot10^{-4} & 3.9\mycdot10^{-6} & 1.7\mycdot10^{-5}& 3.1\mycdot10^{-6} \\
& & min & -0.001 & -1.4\mycdot10^{-4} & -2.1\mycdot{10^{-1}} & -3.9\mycdot10^{6} & -1.8\mycdot10^{-5} & -3.1\mycdot10^{-6}\\ \addlinespace
$\sigma_{\min}$ (0.44) & \mytab{N-R\\Method} &max & 3.9\mycdot10^{-14} & 4.7\mycdot10^{-10} & 2.7\mycdot10^{-10} & 5.9\mycdot10^{-13} & 8.5\mycdot10^{-13} & 1.9\mycdot10^{-13} \\
& & min & -2.6\mycdot10^{-10} & -4.8\mycdot10^{-10} & -6.8\mycdot10^{-10} & -6.0\mycdot10^{-13} & -3.9\mycdot10^{-14} & -1.8\mycdot10^{-13} \\
\midrule
\textbf{1 : 3} & \mytab{Constant\\Jacobian} & max & 0.011 & 0.208 &0.431 & 0.007 & 0.029 & 0.006 \\
& & min & -1.666 & -0.208 & -0.223 & -0.007 & -0.035 & -0.006 \\ \addlinespace
$\sigma_{\max}$ (2.34) & \mytab{Updated\\Jacobian} & max & 4.8\mycdot10^{-6} & 7.1\mycdot10^{-5} & 1.5\mycdot10^{-4} & 3.62\mycdot10^{-6} & 1.3\mycdot10^{-5} & 3.1\mycdot10^{-6} \\
& & min & -7.3\mycdot10^{-4} & -7.1\mycdot10^{-5} & -1.0\mycdot10^{-4} & -3.6\mycdot10^{-6} & -1.4\mycdot10^{-5} & -3.1\mycdot10^{-6} \\ \addlinespace
$\sigma_{\min}$ (0.43) & \mytab{N-R\\Method} & max & 2.8\mycdot10^{-14} & 2.1\mycdot10^{-10} & 1.17\mycdot10^{-10} & 1.03\mycdot10^{-9} & 2.8\mycdot10^{-13} & 1.4\mycdot10^{-13}\\
& &min & -2.1\mycdot10^{-9} & -2.2\mycdot10^{-10} & -3.1\mycdot10^{-10} & -1.0\mycdot10^{-9} & -5.2\mycdot10^{-14} & -1.2\mycdot10^{-13}\\
\bottomrule
\end{tabular*}
\end{table*}
\end{document}