siunitx 更新导致问题

siunitx 更新导致问题

我升级到了 v2.1,siunitx因为 ubuntu 的包管理器版本(1.3?)太旧了。似乎出了问题。安装时可能出了问题,或者缺少依赖项等。我无法很好地阅读日志文件来找出问题所在。

.dtx我通过将文件复制到我的本地 texmf 树texmf/tex/latex/siunitx/,然后tex siunitx.sty从该目录运行来安装它。

当我尝试使用该包时,出现此错误:

! Undefined control sequence.
\siunitx_cs_if_macro:NT #1->\exp_last_unbraced:No 
                                                  \siunitx_cs_if_tl_aux:w {\...
l.6 \begin{document}

Runaway argument?
{\token_to_meaning:N \bar macro\q_stop }{\prg_return_true: }{\prg_return_false: \ETC.
! Paragraph ended before \siunitx_cs_if_tl_aux:w was complete.
<to be read again> 
                   \par 
l.7 

这是\listfiles

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 siunitx.sty    2010/11/24 v2.1f A comprehensive (SI) units package
   expl3.sty    2009/08/12 v1458 L3 Experimental code bundle wrapper
 l3names.sty    2009/08/08 v1452 L3 Experimental Naming Scheme for TeX Primitives
l3basics.sty    2009/08/08 v1453 L3 Experimental basic definitions
 l3expan.sty    2009/08/16 v1464 L3 Experimental Argument Expansion module
    l3tl.sty    2009/09/03 v1505 L3 Experimental Token Lists
   l3num.sty    2009/08/08 v1451 L3 Experimental token numbers
l3intexpr.sty    2009/03/20 v1086 L3 Integer Expressions
 l3quark.sty    2009/05/31 v1365 L3 Experimental Quark Commands
   l3seq.sty    2009/06/17 v1415 L3 Experimental sequences and stacks
  l3toks.sty    2009/06/14 v1412 L3 Experimental Token Registers
   l3int.sty    2009/05/28 v1362 L3 Experimental Integer module
   l3prg.sty    2009/09/20 v1545 L3 Experimental control structures
 l3clist.sty    2009/08/05 v1441 L3 Experimental comma separated lists
 l3token.sty    2009/09/22 v1550 L3 Experimental token investigation and manipulation
    l3io.sty    2009/05/31 v1369 L3 Experimental i/o module
  l3prop.sty    2009/09/16 v1536 L3 Experimental Property Lists
   l3msg.sty    2009/09/01 v1502 L3 Experimental LaTeX Messages module
  l3skip.sty    2009/05/28 v1362 L3 Experimental skip registers
   l3box.sty    2009/06/01 v1375 L3 Experimental Box module
l3keyval.sty    2009/07/13 v1424 L3 Experimental keyval processing
  l3keys.sty    2009/09/17 v1542 L3 Experimental key-value support
l3precom.sty    2009/08/08 v1453 L3 Experimental precompilation module
  l3calc.sty    2009/05/28 v1362 L3 Experimental calc module
  l3xref.sty    2009/05/28 v1362 L3 Experimental cross referencing
  l3file.sty    2009/05/28 v1352 L3 Experimental file loading
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
   array.sty    2008/09/09 v2.4c Tabular extension package (FMi)
l3keys2e.sty    2009/08/24 v1494 Parsing LaTeX3 keyvals as LaTeX2e package options
  xparse.sty    2009/08/31 v1497 Generic document command parser
translator.sty    2007/03/11 ver 1.00
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
translator-language-mappings.tex

还有一个 MWE:

\documentclass{article}
\listfiles
\usepackage{siunitx}
\begin{document}
Foo
\end{document}

答案1

这是由于您安装的支持包版本所致。siunitx需要最新版本的expl3xpackages。请更新这些,一切都会好起来。(我想:这正在成为常见问题解答。我应该添加一些版本测试,siunitx如果任何支持太旧,则给出错误消息。)

相关内容