使用 S 列类型的 pm 符号间距不正确

使用 S 列类型的 pm 符号间距不正确

以下代码示例

\documentclass[12pt, twoside]{report}

\usepackage[utf8]{inputenc}
\usepackage{booktabs,siunitx,amsmath,caption}

\sisetup{separate-uncertainty}

\begin{document}

\begin{table}[!htp]
\centering
\setlength\tabcolsep{0pt}

\caption{Some test data}
\label{tab:some example table}

\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  l
  S[table-format=-9.0(6)]
  S[table-format=-2.2(3)]
  S[table-format=-1.2(1)]
  @{}
}
\toprule
Scenario & {$\Delta V$} & {$B_{\textup{geod.}}$} & {$B_{\textup{a (geod.)}}$} \\
\midrule
dh\textsubscript{1900-2000} & -471136458\pm752053 & -16.57\pm 1.12 & -0.41\pm 0.03  \\
Testrun 1                   & -410517206\pm688309 & -17.33\pm 1.16 & -0.43\pm 0.03  \\
\midrule
Testrun 2                   & -439038086\pm779176 & -16.55\pm 0.99 & -0.37\pm 0.03  \\
Testrun 3                   & -439718460\pm770058 & -14.72\pm 1.00 & -0.36\pm 0.03  \\
\bottomrule
\end{tabular*}
\end{table}

\end{document}

复制粘贴自在表中对齐 +- 符号应该创造 所需输出,复制粘贴

但它创造了实际产量

你可以看到标志的pm位置错误地偏向左侧 在此处输入图片描述

知道为什么会发生这种情况吗?如何解决?

编辑:这是创建的 .log 文件(如果有帮助的话)

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.5.2)  12 JUN 2023 12:39
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**document.tex
(./document.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/report.cls
Document Class: report 2022/07/02 v1.4n Standard LaTeX document class
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@chapter=\count186
\c@section=\count187
\c@subsection=\count188
\c@subsubsection=\count189
\c@paragraph=\count190
\c@subparagraph=\count191
\c@figure=\count192
\c@table=\count193
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2021/02/14 v1.3d Input encoding file
\inpenc@prehook=\toks16
\inpenc@posthook=\toks17
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/booktabs/booktabs.sty
Package: booktabs 2020/01/12 v1.61803398 Publication quality tables
\heavyrulewidth=\dimen141
\lightrulewidth=\dimen142
\cmidrulewidth=\dimen143
\belowrulesep=\dimen144
\belowbottomsep=\dimen145
\aboverulesep=\dimen146
\abovetopsep=\dimen147
\cmidrulesep=\dimen148
\cmidrulekern=\dimen149
\defaultaddspace=\dimen150
\@cmidla=\count194
\@cmidlb=\count195
\@aboverulesep=\dimen151
\@belowrulesep=\dimen152
\@thisruleclass=\count196
\@lastruleclass=\count197
\@thisrulewidth=\dimen153
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/siunitx/siunitx.sty
Package: siunitx 2023-03-04 v3.2.2 A comprehensive (SI) units package
\l__siunitx_angle_tmp_dim=\dimen154
\l__siunitx_angle_marker_box=\box51
\l__siunitx_angle_unit_box=\box52
\l__siunitx_compound_count_int=\count198

(/usr/local/texlive/2023/texmf-dist/tex/latex/translations/translations.sty
Package: translations 2022/02/05 v1.12 internationalization of LaTeX2e packages
 (CN)

(/usr/local/texlive/2023/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count199
)
(/usr/local/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)

(/usr/local/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
(/usr/local/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
)
(/usr/local/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
))
\l__siunitx_number_exponent_fixed_int=\count266
\l__siunitx_number_min_decimal_int=\count267
\l__siunitx_number_min_integer_int=\count268
\l__siunitx_number_round_precision_int=\count269
\l__siunitx_number_lower_threshold_int=\count270
\l__siunitx_number_upper_threshold_int=\count271
\l__siunitx_number_group_first_int=\count272
\l__siunitx_number_group_size_int=\count273
\l__siunitx_number_group_minimum_int=\count274

(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text

(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen155
))
\l__siunitx_table_tmp_box=\box53
\l__siunitx_table_tmp_dim=\dimen156
\l__siunitx_table_column_width_dim=\dimen157
\l__siunitx_table_integer_box=\box54
\l__siunitx_table_decimal_box=\box55
\l__siunitx_table_uncert_box=\box56
\l__siunitx_table_before_box=\box57
\l__siunitx_table_after_box=\box58
\l__siunitx_table_before_dim=\dimen158
\l__siunitx_table_carry_dim=\dimen159
\l__siunitx_unit_tmp_int=\count275
\l__siunitx_unit_position_int=\count276
\l__siunitx_unit_total_int=\count277

(/usr/local/texlive/2023/texmf-dist/tex/latex/tools/array.sty
Package: array 2022/09/04 v2.5g Tabular extension package (FMi)
\col@sep=\dimen160
\ar@mcellbox=\box59
\extrarowheight=\dimen161
\NC@list=\toks19
\extratabsurround=\skip50
\backup@length=\skip51
\ar@cellbox=\box60
))
(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2022/04/08 v2.17n AMS math features
\@mathmargin=\skip52

For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen162
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\inf@bad=\count278
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count279
\leftroot@=\count280
LaTeX Info: Redefining \overline on input line 399.
LaTeX Info: Redefining \colon on input line 410.
\classnum@=\count281
\DOTSCASE@=\count282
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box61
\strutbox@=\box62
LaTeX Info: Redefining \big on input line 722.
LaTeX Info: Redefining \Big on input line 723.
LaTeX Info: Redefining \bigg on input line 724.
LaTeX Info: Redefining \Bigg on input line 725.
\big@size=\dimen163
LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
\macc@depth=\count283
LaTeX Info: Redefining \bmod on input line 905.
LaTeX Info: Redefining \pmod on input line 910.
LaTeX Info: Redefining \smash on input line 940.
LaTeX Info: Redefining \relbar on input line 970.
LaTeX Info: Redefining \Relbar on input line 971.
\c@MaxMatrixCols=\count284
\dotsspace@=\muskip16
\c@parentequation=\count285
\dspbrk@lvl=\count286
\tag@help=\toks20
\row@=\count287
\column@=\count288
\maxfields@=\count289
\andhelp@=\toks21
\eqnshift@=\dimen164
\alignsep@=\dimen165
\tagshift@=\dimen166
\tagwidth@=\dimen167
\totwidth@=\dimen168
\lineht@=\dimen169
\@envbody=\toks22
\multlinegap=\skip53
\multlinetaggap=\skip54
\mathdisplay@stack=\toks23
LaTeX Info: Redefining \[ on input line 2953.
LaTeX Info: Redefining \] on input line 2954.
)
(/usr/local/texlive/2023/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2023/03/12 v3.6j Customizing captions (AR)

(/usr/local/texlive/2023/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2023/03/12 v2.4 caption3 kernel (AR)

(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks24
)
\caption@tempdima=\dimen170
\captionmargin=\dimen171
\caption@leftmargin=\dimen172
\caption@rightmargin=\dimen173
\caption@width=\dimen174
\caption@indent=\dimen175
\caption@parindent=\dimen176
\caption@hangindent=\dimen177
Package caption Info: Standard document class detected.
)
\c@caption@flags=\count290
\c@continuedfloat=\count291
)

Package siunitx Info: Option "separate-uncertainty" has been deprecated in
(siunitx)             this release.
(siunitx)             
(siunitx)             Use "uncertainty-mode = separate" as a replacement.

Package translations Info: No language package found. I am going to use `englis
h' as default language. on input line 8.

(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2023-01-16 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count292
\l__pdf_internal_box=\box63
)
(./document.aux)
\openout1 = `document.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.

(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/color.sty
Package: color 2022/01/06 v1.3d Standard LaTeX Color (DPC)

(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: pdftex.def on input line 149.

(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex

(/usr/local/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count293
\scratchdimen=\dimen178
\scratchbox=\box64
\nofMPsegments=\count294
\nofMParguments=\count295
\everyMPshowfont=\toks25
\MPscratchCnt=\count296
\MPscratchDim=\dimen179
\MPnumerator=\count297
\makeMPintoPDFobject=\count298
\everyMPtoPDFconversion=\toks26
)) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx))
(/usr/local/texlive/2023/texmf-dist/tex/latex/translations/translations-basic-d
ictionary-english.trsl
File: translations-basic-dictionary-english.trsl (english translation file `tra
nslations-basic-dictionary')
)
Package translations Info: loading dictionary `translations-basic-dictionary' f
or `english'. on input line 8.
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
 [1

{/usr/local/texlive/2023/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./docu
ment.aux) ) 
Here is how much of TeX's memory you used:
 7479 strings out of 476025
 176765 string characters out of 5790018
 1856388 words of memory out of 5000000
 27918 multiletter control sequences out of 15000+600000
 516004 words of font info for 45 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 73i,13n,77p,225b,523s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/c
mmi12.pfb></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cm
r12.pfb></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8
.pfb></usr/local/texlive/2023/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.
pfb>
Output written on document.pdf (1 page, 42028 bytes).
PDF statistics:
 28 PDF objects out of 1000 (max. 8388607)
 16 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

答案1

这是 v3 中的一个错误,很快就会得到纠正。目前,使用

\ExplSyntaxOn
\cs_gset_protected:Npn \__siunitx_table_print_format_auxix:w
  #1 \q_nil #2 \q_nil #3 \q_mark
  #4 \q_nil #5 \q_nil #6 \q_stop
  {
    \__siunitx_table_print_format_box:Nn \l__siunitx_table_tmp_box {#1#2}
    \hbox_set_to_wd:Nnn \l__siunitx_table_tmp_box
      {
          \box_wd:N \l__siunitx_table_uncert_box
        + \box_wd:N \l__siunitx_table_tmp_box
      }
      {
        \hbox_unpack:N \l__siunitx_table_uncert_box
        \tl_if_blank:nF {#2#5}
          { \siunitx_print_number:n {#4#5} }
        \__siunitx_table_fil:
      }
    \dim_set:Nn \l__siunitx_table_tmp_dim { \box_wd:N \l__siunitx_table_tmp_box }
    \__siunitx_table_print_format_auxxii:w #3 \q_mark #6 \q_stop
  }
\ExplSyntaxOff

加载后siunitx纠正行为。

相关内容