![表格中 \pm 符号前的上标对齐问题](https://linux22.com/image/376675/%E8%A1%A8%E6%A0%BC%E4%B8%AD%20%5Cpm%20%E7%AC%A6%E5%8F%B7%E5%89%8D%E7%9A%84%E4%B8%8A%E6%A0%87%E5%AF%B9%E9%BD%90%E9%97%AE%E9%A2%98.png)
首先,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
这样做,因为这不会增加可读性;事实上,在我看来,它反而会阻碍可读性。