如何进行小数列对齐?

如何进行小数列对齐?

我正在尝试将小数对齐方式放入下表中。您能给我一些建议吗?提前谢谢!

目前我的表格是这样的:

在此处输入图片描述

\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}
\usepackage{siunitx}

\begin{document}
\begin{table*}[h!]
\caption{Results with different numerical schemes for the simple Cartesian trajectory}
\label{Table:02}
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{ccccccccc} \hline
   Radius of platforms  Vs Limb lengths  &  Numerical Scheme &      &    &     & Errors    &    &   &     \\ \cline{4-9}
  &  &  &  $\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.39   & 1.27 & $\mathbf{2.41}$ & 0.54 & 0.73 & 0.74 \\ 
                  &                   & min & $\mathbf{-4.52}$ &    -1.38 & -1.88 & -0.56 & -0.72 & -0.72 \\               
    $\sigma_{max}$   (1.08)            &   Updated Jacobian & max &    0.51 & $\mathbf{0.92}$ & 0.85 & 0.58 & 0.68 & 0.68 \\
       &      & min & -0.56 & -0.84 &$\mathbf{ -0.93}$ & -0.58 & -0.83 & -0.81 \\
        $\sigma_{min}$ (0.54)      & Newton-Raphson Method   & max & 0.50 &$\mathbf{ 0.87} $ & 0.84 & 0.63 & 0.68  & 0.72 \\
              &         with $\mathtt{fsolve}$                  & min & -0.48 &$\mathbf{ -1.08}$ & -0.83 &-0.58 & -0.74 &-0.73 \\ \hline
\\
  $\mathbf  {1:2}$     & Constant Jacobian  & max &0.41 & 1.47 & $\mathbf{1.74}$ & 1.02 & 0.58 & 0.53 \\
              &       & min &$\mathbf{ -2.72}$ & -1.49 & -1.56 & -1.11 & -0.55 & -0.52 \\
        $\sigma_{max}$  (1.65)     & Updated Jacobian & max & 0.43 & 1.37 & $\mathbf{1.49}$ & 1.06 & 0.55 & 0.57 \\
                &                  & min & -0.50 & $\mathbf{-1.55}$ & -1.52 & -0.87 & -0.57 & -0.59\\
     $\sigma_{min}$ (0.44)        & Newton-Raphson Method  &max & 0.38 & $\mathbf{1.44}$ & 1.37 & 0.98 & 0.51 & 0.58 \\
              &          with $\mathtt{fsolve}$              &min & -0.44 &$\mathbf{ -1.39}$ & -1.38 & -1.05 & -0.57 & -0.62 \\ \hline 
\\
    $\mathbf{1:3}$     &  Constant Jacobian & max & 0.37 & 1.94 &$\mathbf{ 1.95}$ & 1.35 & 0.53 & 0.50 \\
             &               & min & -1.88 & -1.76 & $\mathbf{-2.06}$ & -1.24 & -0.63 & -0.55 \\
        $\sigma_{max}$ (2.34)           & Updated Jacobian  & max & 0.39 & 1.93 & $\mathbf{2.10}$ & 1.37 & 0.54 & 0.51 \\
               &                     & min & -0.42 & $\mathbf{-1.96}$ & -1.84 & -1.34 & -0.54 & -0.53 \\
           $\sigma_{min}$ (0.43)       & Newton-Raphson Method  & max & 0.37 &$\mathbf{ 1.93}$ & 1.87 & 1.54 & 0.60 & 0.58 \\
              &              with $\mathtt{fsolve}$         &min & -0.39 &$\mathbf{ -2.13}$ & -1.85 & -1.33 & -0.53 & -0.51\\ \hline
\end{tabular}
\end{adjustbox}
\end{table*}
\end{document}

答案1

这里显示了第四列,其中包含包rccol和列说明符R

\documentclass{article}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}
\usepackage{siunitx}
\usepackage{rccol}
\rcDecimalSign{.}
\usepackage{amsmath,bm,adjustbox}
\def\MC#1{\multicolumn{1}{c}{#1}}

\begin{document}
\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.39   & 1.27 & 
                $\mathbf{2.41}$ & 0.54 & 0.73 & 0.74 \\ 
                &                   & min & $\bf-4.52$ &    -1.38 & -1.88 & -0.56 & 
                -0.72 & -0.72 \\               
                $\sigma_{max}$   (1.08)            &   Updated Jacobian & max &    0.51 & 
                $\mathbf{0.92}$ & 0.85 & 0.58 & 0.68 & 0.68 \\
                &      & min & -0.56 & -0.84 &$\bf-0.93$ & -0.58 & -0.83 & -0.81 \\
                $\sigma_{min}$ (0.54)      & Newton-Raphson Method   & max & 0.50 
                &$\mathbf{ 0.87} $ & 0.84 & 0.63 & 0.68  & 0.72 \\
                &         with $\mathtt{fsolve}$                  & min & -0.48 
                &$\mathbf{ -1.08}$ & -0.83 &-0.58 & -0.74 &-0.73 \\ \hline
                \\
                $\mathbf  {1:2}$     & Constant Jacobian  & max &0.41 & 1.47 & 
                $\mathbf{1.74}$ & 1.02 & 0.58 & 0.53 \\
                &       & min &$\bf-2.72$ & -1.49 & -1.56 & -1.11 & -0.55 & -0.52 
                \\
                $\sigma_{max}$  (1.65)     & Updated Jacobian & max & 0.43 & 1.37 & 
                $\mathbf{1.49}$ & 1.06 & 0.55 & 0.57 \\
                &                  & min & -0.50 & $\mathbf{-1.55}$ & -1.52 & -0.87 & 
                -0.57 & -0.59\\
                $\sigma_{min}$ (0.44)        & Newton-Raphson Method  &max & 0.38 & 
                $\mathbf{1.44}$ & 1.37 & 0.98 & 0.51 & 0.58 \\
                &          with $\mathtt{fsolve}$              &min & -0.44 &$\mathbf{ 
                -1.39}$ & -1.38 & -1.05 & -0.57 & -0.62 \\ \hline 
                \\
                $\mathbf{1:3}$     &  Constant Jacobian & max & 0.37 & 1.94 &$\mathbf{ 
                1.95}$ & 1.35 & 0.53 & 0.50 \\
                &               & min & -1.88 & -1.76 & $\mathbf{-2.06}$ & -1.24 & -0.63 
                & -0.55 \\
                $\sigma_{max}$ (2.34)           & Updated Jacobian  & max & 0.39 & 1.93 & 
                $\mathbf{2.10}$ & 1.37 & 0.54 & 0.51 \\
                &                     & min & -0.42 & $\mathbf{-1.96}$ & -1.84 & -1.34 & 
                -0.54 & -0.53 \\
                $\sigma_{min}$ (0.43)       & Newton-Raphson Method  & max & 0.37 
                &$\mathbf{ 1.93}$ & 1.87 & 1.54 & 0.60 & 0.58 \\
                &              with $\mathtt{fsolve}$         &min & -0.39 &$\mathbf{ 
                -2.13}$ & -1.85 & -1.33 & -0.53 & -0.51\\ \hline
            \end{tabular}
        \end{adjustbox}
\end{document}

在此处输入图片描述

答案2

使用geometry包,您不必使用adjustbox。这是我的建议,wih makecell,它允许在单元格中换行:

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{booktabs}
\usepackage{multirow, makecell, caption}
\usepackage{bm}
\let\pmb\bm
\usepackage{array}
\usepackage{adjustbox}
\usepackage{siunitx}

\begin{document}

\begin{table*}[h!]
  \caption{Results with different numerical schemes for the simple Cartesian trajectory}
  \label{Table:02}
  \centering\sisetup{table-format=-1.2}\renewcommand\cellalign{lc}
  \setlength\tabcolsep{3.3pt}
  \begin{tabular}{clc*{6}{S}} \toprule
    \multirowcell{2}{Radius of platforms \\ vs Limb lengths }& \multicolumn{1}{c}{Numerical Scheme} & & & & {Errors} & & & \\ \cmidrule{4-9}
                           & & & {$\bm{g}_x[\rm{mm}]$} & {$\bm{g}_y[\rm{mm}]$} & {$\bm{g}_z[\rm{mm}]$} & {$\bm{g}_{ψ}[^{ ∘ }]$} & { $\bm{g}_{θ}[^{ ∘ }]$} & {$\bm{g}_{ϕ}[^{ ∘ }]$} \\ \midrule
    \addlinespace
    $\mathbf {1:1}$ & Constant Jacobian & max & 0.39 & 1.27 & $\mathbf{\phantom{-}2.41}$ & 0.54 & 0.73 & 0.74 \\
                           & & min & $\mathbf{-4.52}$ & -1.38 & -1.88 & -0.56 & -0.72 & -0.72 \\
    $\sigma_{\max}$ (1.08) & Updated Jacobian & max & 0.51 & $\mathbf{\phantom{-}0.92}$ & 0.85 & 0.58 & 0.68 & 0.68 \\
                           & & min & -0.56 & -0.84 & $\mathbf{ -0.93}$ & -0.58 & -0.83 & -0.81 \\
    $\sigma_{\min}$ (0.54) & \multirowcell{2}{ Newton-Raphson\\ Method with $\mathtt{fsolve}$} & max & 0.50 &$\mathbf{\phantom{-}0.87} $ & 0.84 & 0.63 & 0.68 & 0.72 \\
                           & & min & -0.48 & $\mathbf{ -1.08}$ & -0.83 & -0.58 & -0.74 & -0.73 \\ \midrule
    \addlinespace
    $\mathbf {1:2}$ & Constant Jacobian & max & 0.41 & 1.47 & $\mathbf{\phantom{-}1.74}$ & 1.02 & 0.58 & 0.53 \\
                           & & min & $\mathbf{ -2.72}$ & -1.49 & -1.56 & -1.11 & -0.55 & -0.52 \\
    $\sigma_{\max}$ (1.65) & Updated Jacobian & max & 0.43 & 1.37 & $\mathbf{\phantom{-}1.49}$ & 1.06 & 0.55 & 0.57 \\
                           & & min & -0.50 & $\mathbf{-1.55}$ & -1.52 & -0.87 & -0.57 & -0.59 \\
    $\sigma_{\min}$ (0.44) & \multirowcell{2}{ Newton-Raphson\\ Method with $\mathtt{fsolve}$} &max & 0.38 & $\mathbf{\phantom{-}1.44}$ & 1.37 & 0.98 & 0.51 & 0.58 \\
                           & & min & -0.44 & $\mathbf{ -1.39}$ & -1.38 & -1.05 & -0.57 & -0.62 \\ \midrule
    \addlinespace
    $\mathbf{1:3}$ & Constant Jacobian & max & 0.37 & 1.94 & $\mathbf{\phantom{-}1.95}$ & 1.35 & 0.53 & 0.50 \\
                           & & min & -1.88 & -1.76 & $\mathbf{-2.06}$ & -1.24 & -0.63 & -0.55 \\
    $\sigma_{\max}$ (2.34) & Updated Jacobian & max & 0.39 & 1.93 & $\mathbf{\phantom{-}2.10}$ & 1.37 & 0.54 & 0.51 \\
                           & & min & -0.42 & $\mathbf{-1.96}$ & -1.84 & -1.34 & -0.54 & -0.53 \\
    $\sigma_{\min}$ (0.43) & \multirowcell{2}{ Newton-Raphson\\ Method with $\mathtt{fsolve}$} & max & 0.37 &$\mathbf{\phantom{-}1.93}$ & 1.87 & 1.54 & 0.60 & 0.58 \\
                           & & min & -0.39 & $ \mathbf{ -2.13} $ & -1.85 & -1.33 & -0.53 & -0.51 \\ \bottomrule
  \end{tabular}
  % \end{adjustbox}
\end{table*}

\end{document}

在此处输入图片描述

相关内容