如何在 makecell 中对齐数字?

如何在 makecell 中对齐数字?

假设我已经定义了一个表,如下所示:

\usepackage{booktabs}
\usepackage{makecell}


\begin{table}[htb!]
\centering
% \caption[]{\small}
\label{tab:zoom}
\scalebox{1}{%
\begin{tabular}{c|c|c|c|c} 
& $\mathbf{\textbf{x}_0}$ \texttt{(10x)} & 
$\mathbf{\textbf{I}_\textbf{max}}$  \texttt{(10x)} & 
$\mathbf{\textbf{x}_0}$ \texttt{(100x)} & 
$\mathbf{\textbf{I}_\textbf{max}}$  \texttt{(100x)} 
\\ \midrule
\textsf{Si} & 
\small \makecell[c]{$482,5$  $\pm$  $1,6$} & 
\small \makecell{$a$ \\ $b$ \\ $c$ } & 
\small \makecell{$1,6 \pm 0,5$ \\ $520,67 \pm 0,01$ \\ $963\pm 2$ } &
\small \makecell{$a$ \\ $b$ \\ $c$ } \\
\midrule
\textsf{GaN} & 
\small \makecell{$1,79 \pm 0,01$ \\ $418,0\pm 1,8$ \\ $482,9\pm 0,3$ \\ $570,3\pm 0,7$ \\ $735,3\pm 0,8$ \\ $1461,5\pm 0,8$ \\ $1524,4\pm 0,8$ } & 
\small \makecell{$a$ \\ $b$ \\ $c$ } & 
\small \makecell{$1,70\pm 0,09$ \\ $144,4\pm 0,8$ \\ $482,44\pm 1,16$ \\ $570,48\pm 0,10$ \\ $735,70\pm 0,24$}&
\small \makecell{$a$ \\ $b$ \\ $c$ } \\
\midrule
\textsf{ZnO} & 
\small \makecell{$2,0 \pm 0,1$ \\ $100,42\pm 0,14$ \\ $341,8\pm 2,5$ \\ $438,4\pm 0,6$ \\ $482,80\pm 0,20$ \\ $1134\pm 4$ \\ $1461,5\pm 0,3$ \\  $1524,4 \pm0,5$ }& 
\small \makecell{$a$ \\ $b$ \\ $c$ } & 
\small \makecell{$1,65 \pm 0,24$ \\ $99,97\pm 0,10$ \\ $332,8\pm 1,0$ \\ $438,4\pm 0,5$ \\ $482,7\pm 0,4$ \\ $1133 \pm 4$ \\ $1461,6\pm 0,6$ \\ $ 1524,5\pm0,6$}&
\small \makecell{$a$ \\ $b$ \\ $c$ } \\
\end{tabular}%
}
\end{table}

在此处输入图片描述

如何使 makecell 中的每个数字在 $\pm$ 处对齐?

我没有希尼奇上班。

答案1

以下siunitx基于的示例应该可以帮助您入门:

在此处输入图片描述

\documentclass{article}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{graphicx}

\usepackage{multirow}
\usepackage{siunitx}
\begin{document}


\begin{table}[htb!]
\sisetup{separate-uncertainty=true, output-decimal-marker = {,}}
\centering
% \caption[]{\small}
\label{tab:zoom}
\begin{tabular}{c S[table-format=4.1(3)]c S[table-format=4.2(3)]c} 
\toprule
& {$\mathbf{\textbf{x}_0}$ \texttt{(10x)}} & 
{$\mathbf{\textbf{I}_\textbf{max}}$  \texttt{(10x)}} & 
{$\mathbf{\textbf{x}_0}$ \texttt{(100x)}} & 
{$\mathbf{\textbf{I}_\textbf{max}}$  \texttt{(100x)}} 
\\ \midrule
\multirow{7}{*}{\textsf{GaN}} & 1,79(1)   & \multirowcell{7}{$a$ \\ $b$ \\ $c$ } &             & \multirowcell{7}{$a$ \\ $b$ \\ $c$ } \\
                              & 418,0(18) &                                      & 1,70(9)     &                                      \\
                              & 482,9(3)  &                                      & 144,4(8)    &                                      \\
                              & 570,3(7)  &                                      & 482,44(116) &                                      \\
                              & 735,3(8)  &                                      & 570,48(10)  &                                      \\
                              & 1461,5(8) &                                      & 735,70(24)  &                                      \\
                              & 1524,4(8) &                                                    &                                      \\
\bottomrule
\end{tabular}%
\end{table}

\end{document}

相关内容