表格中 \pm 符号前的上标对齐问题

表格中 \pm 符号前的上标对齐问题

首先,MWE:

\documentclass{article}

\usepackage[english,spanish,es-nodecimaldot]{babel}

\usepackage{siunitx}
\sisetup{separate-uncertainty}
\sisetup{detect-weight, detect-display-math}
\sisetup{detect-inline-weight=math}
\sisetup{mode=text,per-mode=symbol}
\sisetup{table-align-text-post=true,
    table-space-text-post  =
    \textsuperscript{\emph{a}}}

\usepackage{multirow}
\usepackage{makecell}
\usepackage{booktabs}
\renewcommand\theadfont{\normalsize\bfseries\boldmath}

\usepackage{tabularx}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}

\begin{document}

\sisetup{table-align-text-post=true,
    table-space-text-post  =
    \textsuperscript{\emph{a}}}

\begin{table}[htbp]
    \centering
    \caption{Esto es el título}
    \label{resultados}
    \begin{tabular*}{0.8\textwidth}{
            @{\extracolsep{\fill}}
            l
            l
            S[table-format=2.1(2)]
            S[table-format=3.1(3)]
        }
        \toprule
        \multicolumn{2}{c}{\bfseries{Condiciones}} & {\bfseries{RCT (\si{\minute})}} & {\bfseries{$\mathbf{G'_{60}}$ (\si{\pascal})}}\\
        \midrule
        \multirow{3}{*}{{\bfseries{Parámetro A}}} & Alta & 7.9$^a$\pm1.3 & 74.6\pm6.7 \\
        & Media & 15.4$^b$ \pm0.9 & 57.7\pm5.0 \\
        & Baja  & 31.8$^c$ \pm0.5 & 26.9\pm2.3 \\
        \midrule
        \multirow{3}{*}{{\bfseries{Parámetro B}}} & Alta & 14.6\pm1.9 & 76.8\pm1.8 \\
        & Media & 15.4\pm0.9 & 57.7\pm5.0 \\
        & Baja  & 19.8\pm0.3 & 29.9\pm1.3 \\
        \midrule
        \multirow{2}{*}{{\bfseries{Parámetro C}}} & Alto & 15.4\pm0.9  & 57.7\pm5.0\\
        & Bajo  & 4.9\pm0.5  & 135.2\pm12.8 \\ 
        \bottomrule
    \end{tabular*}\\\smallskip
    \parbox{0.8\textwidth}{
        \scriptsize Valores medios $\pm$ desviación estándar de tres réplicas. Medias con letras distintas son significativamente diferentes (test de Tukey, $p<0.05$).}
\end{table}

\end{document}

结果如下:

在此处输入图片描述

如您所见,符号前的上标字母对齐存在问题\pm。我一直在阅读是否有人遇到过此问题,但我找不到任何问题。

感谢您给我的所有建议。

一个 MWE 遇到了与上一个问题相关的另一个问题:

\documentclass{article}

\usepackage[english,spanish,es-nodecimaldot]{babel}

\usepackage{siunitx}
\sisetup{separate-uncertainty}
\sisetup{detect-weight, detect-display-math}
\sisetup{detect-inline-weight=math}
\sisetup{mode=text,per-mode=symbol}

\usepackage{booktabs}

\usepackage[font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}

\newcommand{\tnote}[1]{\textsuperscript{\emph{#1}}}

\begin{document}

\begin{table}[htbp]
\centering

\caption{Esto es el título}
\label{resultados}

\begin{tabular*}{0.8\textwidth}{
  @{\extracolsep{\fill}}
  l
  l
  S[table-format=2.1(2),
    table-align-text-post=true,
    table-space-text-post=\tnote{a},
   ]
  S[table-format=3.1(3),
  table-align-text-post=true,
  table-space-text-post=\tnote{a}
  ]
  @{}
}
\toprule
\multicolumn{2}{c}{\bfseries{Condiciones}} &
{\bfseries{RCT (\si{\minute})}} &
{\bfseries{$\mathbf{G'_{60}}$ (\si{\pascal})}}\\
\midrule
\bfseries Parámetro A & Alta  &  7.9\pm1.3\tnote{a} & 74.6\pm6.7\tnote{a} \\
                      & Media & 15.4\pm0.9\tnote{b} & 57.7\pm5.0\tnote{b} \\
                      & Baja  & 31.8\pm0.5\tnote{c} & 26.9\pm2.3\tnote{c} \\
\midrule
\bfseries Parámetro B & Alta  & 14.6\pm1.9 &   76.8\pm1.8 \\
                      & Media & 15.4\pm0.9 &   57.7\pm5.0 \\
                      & Baja  & 19.8\pm0.3 &   29.9\pm1.3 \\
\midrule
\bfseries Parámetro C & Alto  & 15.4\pm0.9  &  57.7\pm5.0\tnote{a}\\
                      & Bajo  &  4.9\pm0.5  & 135.2\pm12.8\tnote{b} \\ 
\midrule[\heavyrulewidth]
\end{tabular*}
\parbox[t]{0.8\textwidth}{%
  \scriptsize Valores medios $\pm$ desviación estándar de tres réplicas. 
  Medias con letras distintas son significativamente diferentes (test de 
  Tukey, $p<0.05$).}

\end{table}

\end{document}

结果是:

在此处输入图片描述

当误差数字不同时,上标对齐不良,在此示例中,右列中大多数误差数据为两位数,但有一个为三位数。我不知道如何修复它。

答案1

注释标记应位于完整数字之后:

\documentclass{article}

\usepackage[english,spanish,es-nodecimaldot]{babel}

\usepackage{siunitx}
\sisetup{separate-uncertainty}
\sisetup{detect-weight, detect-display-math}
\sisetup{detect-inline-weight=math}
\sisetup{mode=text,per-mode=symbol}

\usepackage{booktabs}

\usepackage[font=small,labelfont=bf]{caption}
\usepackage{amsmath,amssymb}

\newcommand{\tnote}[1]{\textsuperscript{\emph{#1}}}

\begin{document}

\begin{table}[htbp]
\centering

\caption{Esto es el título}
\label{resultados}

\begin{tabular*}{0.8\textwidth}{
  @{\extracolsep{\fill}}
  l
  l
  S[table-format=2.1(2),
    table-align-text-post=true,
    table-space-text-post=\tnote{a},
   ]
  S[table-format=3.1(3)]
  @{}
}
\toprule
\multicolumn{2}{c}{\bfseries{Condiciones}} &
{\bfseries{RCT (\si{\minute})}} &
{\bfseries{$\mathbf{G'_{60}}$ (\si{\pascal})}}\\
\midrule
\bfseries Parámetro A & Alta  &  7.9\pm1.3\tnote{a} & 74.6\pm6.7 \\
                      & Media & 15.4\pm0.9\tnote{b} & 57.7\pm5.0 \\
                      & Baja  & 31.8\pm0.5\tnote{c} & 26.9\pm2.3 \\
\midrule
\bfseries Parámetro B & Alta  & 14.6\pm1.9 &   76.8\pm1.8 \\
                      & Media & 15.4\pm0.9 &   57.7\pm5.0 \\
                      & Baja  & 19.8\pm0.3 &   29.9\pm1.3 \\
\midrule
\bfseries Parámetro C & Alto  & 15.4\pm0.9  &  57.7\pm5.0\\
                      & Bajo  &  4.9\pm0.5  & 135.2\pm12.8 \\ 
\midrule[\heavyrulewidth]
\end{tabular*}
\parbox[t]{0.8\textwidth}{%
  \scriptsize Valores medios $\pm$ desviación estándar de tres réplicas. 
  Medias con letras distintas son significativamente diferentes (test de 
  Tukey, $p<0.05$).}

\end{table}

\end{document}

在此处输入图片描述

我会避免\multirow这样做,因为这不会增加可读性;事实上,在我看来,它反而会阻碍可读性。

相关内容