来自 \sfrac(xfrac 包)的错误:“缺少数字”和“非法测量单位”

来自 \sfrac(xfrac 包)的错误:“缺少数字”和“非法测量单位”

当我尝试使用\sfrac(从xfrac包中)时,会产生多个错误missing number, treated as zeroillegal unit of measurement (pt inserted)

示例文档:

\documentclass{article}

\usepackage{xfrac}
\usepackage{fix-cm} % Fixes warnings about missing fonts; see http://tex.stackexchange.com/questions/32378/xfrac-siunitx-gives-me-a-font-warning

\begin{document}

Test $\sfrac{1}{2}$.

\end{document}

这会产生八个错误,全部发生在使用的位置\sfrac(一半是“缺失数字”错误,另一半是“非法单位”错误)。

我正在使用 TexMakerX 2.1 和 MikTeX 2.9。如能提供任何关于如何解决此问题的建议,我将不胜感激。

\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)
   xfrac.sty    2011/10/09 v2896 L3 Experimental split-level fractions
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
 ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
l3keys2e.sty    2011/10/09 v2900 LaTeX2e option processing using LaTeX3 keys
  xparse.sty    2011/10/09 v2900 L3 Experimental document command parser
   expl3.sty    2012/07/16 v3990 L3 Experimental code bundle wrapper
 l3names.sty    2012/07/16 v3990 L3 Namespace for primitives
l3bootstrap.sty    2012/07/15 v3986 L3 Experimental bootstrap code
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty    2012/07/15 v3987 L3 Basic definitions
 l3expan.sty    2012/07/15 v3986 L3 Argument expansion
    l3tl.sty    2012/07/15 v3986 L3 Token lists
   l3seq.sty    2012/07/15 v3986 L3 Sequences and stacks
   l3int.sty    2012/07/15 v3986 L3 Integers
 l3quark.sty    2012/07/15 v3986 L3 Quarks
   l3prg.sty    2012/07/15 v3986 L3 Control structures
 l3clist.sty    2012/07/15 v3986 L3 Comma separated lists
 l3token.sty    2012/07/15 v3986 L3 Experimental token manipulation
  l3prop.sty    2012/07/15 v3986 L3 Property lists
   l3msg.sty    2012/07/15 v3986 L3 Messages
  l3file.sty    2012/07/15 v3986 L3 File and I/O operations
  l3skip.sty    2012/07/15 v3986 L3 Dimensions and skips
  l3keys.sty    2012/07/15 v3986 L3 Experimental key-value interfaces
    l3fp.sty    2012/07/15 v3986 L3 Floating points
   l3box.sty    2012/07/15 v3986 L3 Experimental boxes
l3coffins.sty    2012/07/15 v3986 L3 Coffin code layer
 l3color.sty    2012/07/15 v3986 L3 Experimental colour support
l3luatex.sty    2012/07/15 v3986 L3 Experimental LuaTeX-specific functions
l3candidates.sty    2012/05/12 v3633 L3 Experimental additions to l3kernel
textcomp.sty    2005/09/27 v1.99g Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
xtemplate.sty    2011/10/09 v2900 L3 Experimental prototype document functions
  fix-cm.sty    2006/09/13 v1.1m fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
supp-pdf.mkii
 ***********

相关内容