sffamily/mdseries – ! 未定义的控制序列

sffamily/mdseries – ! 未定义的控制序列

我正在写一篇学术论文(ACM 风格“acmart”),其中还包括一些以特殊风格突出显示的程序代码。

我正在运行 Ubuntu 16.10,并且已经通过 apt 安装了 textlive:sudo apt-get install texlive-fonts-extra texlive-full

我的合著者可以使用旧版本的 Ubuntu 来处理同一个 latex 文件。但我收到以下错误?

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./paper17.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(./acmart.cls
Document Class: acmart 2017/05/14 v1.39 Typesetting articles for Association of
 Computing Machinery
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex))
(/usr/share/texlive/texmf-dist/tex/latex/amscls/amsart.cls
Document Class: amsart 2015/03/04 v2.20.2
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def)
(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/totpages/totpages.sty
(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty))
(/usr/share/texlive/texmf-dist/tex/latex/environ/environ.sty
(/usr/share/texlive/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/share/texlive/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (autodetected): hpdftex.

(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ncctools/manyfoot.sty
(/usr/share/texlive/texmf-dist/tex/latex/ncctools/nccfoots.sty))
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)
(/usr/share/texlive/texmf-dist/tex/latex/cmap/cmap.sty)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/libertine.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/mweights/mweights.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontaxes/fontaxes.sty)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/LinLibertine_I.tex))
(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/zi4.sty
`inconsolata-zi4' v1.10, 2016/02/22 Text macros for Inconsolata (msharpe))
(/usr/share/texlive/texmf-dist/tex/latex/newtx/newtxmath.sty
`newtxmath' v1.5, 2016/08/12 Math macros based on txfonts (msharpe)
(/usr/share/texlive/texmf-dist/tex/generic/kastrup/binhex.tex))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)<<t1.cmap>>)
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty
(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty))
(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
(/usr/share/texlive/texmf-dist/tex/latex/comment/comment.sty
Excluding comment 'comment') Excluding comment 'CCSXML'
(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)
Special comment 'acks' Excluding comment 'screenonly'
Include comment 'printonly' Include comment 'anonsuppress'
(/usr/share/texlive/texmf-dist/tex/latex/libertine/T1LinuxLibertineT-TLF.fd))
(./macros.tex (./latex/python.sty

LaTeX Warning: You have requested package `latex/python',
               but the package provides `python'.

(/usr/share/texlive/texmf-dist/tex/latex/xifthen/xifthen.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty))
(/usr/share/texlive/texmf-dist/tex/latex/polytable/polytable.sty
(/usr/share/texlive/texmf-dist/tex/latex/lazylist/lazylist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty))
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty)
(/usr/share/texmf/tex/latex/tipa/tipa.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
! Undefined control sequence.
<argument> \mdseries@sf 

l.357 {\sffamily
                \xdef\@sffamilyname{\f@family}}
? 
(/usr/share/texlive/texmf-dist/tex/latex/libertine/T1LinuxBiolinumT-TLF.fd)

LaTeX Font Warning: Font shape `T1/LinuxBiolinumT-TLF//n' undefined
(Font)              using `T1/LinuxBiolinumT-TLF/m/n' instead on input line 357
.

) (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/utf8x.def)))
(/usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty)
(/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty)
(/usr/share/texlive/texmf-dist/tex/latex/bbm-macros/bbm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/pifont.sty
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/upzd.fd)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/upsy.fd))
Excluding 'CCSXML' comment.)
(./latex/examples/GUIgeneric/experiment7GUIDefinitions.tex)
(./latex/examples/GUIgeneric/experiment8GUIstatedepExample.tex) (./paper17.aux)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/omlnxlmi.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/untxexa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/lmsntxsy.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/lmxntxexx.fd)
(/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/OT1LinuxLibertineT-TLF.fd)<<
ot1.cmap>><<oml.cmap>>
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/untxmia.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/untxsym.fd)
(/usr/share/texlive/texmf-dist/tex/latex/newtx/untxsyc.fd)
ABD: EveryShipout initializing macros
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./paper17.out) (./paper17.out)
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def
fontencoding T3 patched
) (./abstract.tex)
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/libertine/TS1LinuxLibertineT-TLF.fd)
(./introduction.tex

Package natbib Warning: Citation `?' on page 1 undefined on input line 9.


Package natbib Warning: Citation `?' on page 1 undefined on input line 14.


Package natbib Warning: Citation `?' on page 1 undefined on input line 27.


Underfull \hbox (badness 10000) has occurred while \output is active


Underfull \hbox (badness 10000) has occurred while \output is active

[1.1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])
(./illustrationLibrary.tex (./introductoryExample.tex
(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/t1zi4.fd)
Overfull \hbox (8.72478pt too wide) in paragraph at lines 7--7
[][] 

Overfull \hbox (8.72478pt too wide) in paragraph at lines 7--7
[][] 
)) (./paper17.bbl

Package natbib Warning: Empty `thebibliography' environment on input line 40.

)

Package natbib Warning: There were undefined citations.


Underfull \hbox (badness 10000) has occurred while \output is active


Underfull \hbox (badness 10000) has occurred while \output is active

[2.2] (./paper17.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

 ){/usr/share/texlive/texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-4.enc}{/usr/
share/texlive/texmf-dist/fonts/enc/dvips/libertine/lbtn_ki75ao.enc}{/usr/share/
texlive/texmf-dist/fonts/enc/dvips/libertine/lbtn_7grukw.enc}{/usr/share/texliv
e/texmf-dist/fonts/enc/dvips/libertine/lbtn_25tcsq.enc}{/usr/share/texlive/texm
f-dist/fonts/enc/dvips/libertine/lbtn_naooyc.enc}{/usr/share/texlive/texmf-dist
/fonts/enc/dvips/libertine/lbtn_nh77jq.enc}{/usr/share/texlive/texmf-dist/fonts
/enc/dvips/libertine/lbtn_76gpa5.enc}</usr/share/texlive/texmf-dist/fonts/type1
/public/inconsolata/Inconsolata-zi4r.pfb></usr/share/texlive/texmf-dist/fonts/t
ype1/public/libertine/LinBiolinumT.pfb></usr/share/texlive/texmf-dist/fonts/typ
e1/public/libertine/LinLibertineT.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/libertine/LinLibertineTB.pfb></usr/share/texlive/texmf-dist/fonts/type
1/public/libertine/LinLibertineTBI.pfb></usr/share/texlive/texmf-dist/fonts/typ
e1/public/libertine/LinLibertineTI.pfb>
Output written on 

我认为主要错误是未定义的控制序列,可能是由于包和/或字体问题:

(/usr/share/texlive/texmf-dist/tex/latex/xifthen/xifthen.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ifmtarg/ifmtarg.sty))
(/usr/share/texlive/texmf-dist/tex/latex/polytable/polytable.sty
(/usr/share/texlive/texmf-dist/tex/latex/lazylist/lazylist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty))
(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty)
(/usr/share/texmf/tex/latex/tipa/tipa.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
! Undefined control sequence.
<argument> \mdseries@sf 

l.357 {\sffamily
                \xdef\@sffamilyname{\f@family}}
? 
(/usr/share/texlive/texmf-dist/tex/latex/libertine/T1LinuxBiolinumT-TLF.fd)

LaTeX Font Warning: Font shape `T1/LinuxBiolinumT-TLF//n' undefined
(Font)              using `T1/LinuxBiolinumT-TLF/m/n' instead on input line 357
.

) (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def)))

有什么指点吗?

答案1

@Boris 和 @cfr 找到了解决方案。libertine问题出在包裹上。

“acmart.cls”的补丁是这样的:

diff --git a/acmart.cls b/acmart.cls
index f6c56ed..d822262 100644
--- a/acmart.cls
+++ b/acmart.cls
@@ -615,9 +615,9 @@ Computing Machinery]
     have newtxmath package installed.  Please upgrade your
     TeX}\@ACM@newfontsfalse}
 \if@ACM@newfonts
-\RequirePackage[tt=false, type1=true]{libertine}
+%\RequirePackage[tt=false, type1=true]{libertine}
 \RequirePackage[varqu]{zi4}
-\RequirePackage[libertine]{newtxmath}
+%\RequirePackage[libertine]{newtxmath}
 \RequirePackage[T1]{fontenc}
 \fi
 \if@ACM@sigchiamode

但是,您可能会得到不同的字体。在这种情况下,共同作者必须提交他们的 PDF 版本。

相关内容