Xelatex、mathspec 和 microtype - 奇怪的错误消息

Xelatex、mathspec 和 microtype - 奇怪的错误消息

我尝试使用 XeLaTeX (TeXLive 2012) 以及 mathspec 和 microtype (支持 XeLaTeX 的 2.5 版) 编译文档。我需要文档中的 10.5pt 字体,因此我重新定义了 \normalsize 命令。一切正常,但当我尝试使用 microtype 包时,它失败了,我收到以下错误消息

LaTeX Font Warning: Font shape `OML/cmm/m/it' in size <10.5> not available
(Font)              size <10.95> substituted on input line 14.

! Cannot use \XeTeXcharglyph with cmmi5; not a native platform font.
\MT@get@slot@ ...rest \@tempcnta =\XeTeXcharglyph 
                                              \MT@char \relax \ifnum \@t...
l.14 \[

使用 fontspec 可以,使用 mathspec 则不行。有人知道这是怎么回事吗?

这是我的文档

\documentclass{article}

\usepackage[MnSymbol]{mathspec}
\usepackage{microtype}
\setmainfont[Numbers=Lining, Ligatures=TeX]{Minion Pro}
\setmathfont(Digits,Greek,Latin)[Numbers=Lining]{Minion Pro}

\renewcommand{\normalsize}{\fontsize{10.5}{13}\selectfont}
\begin{document}

\[
\sum_{i=1}^\infty \alpha^i
\]

\end{document}

带有 \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)
mathspec.sty    2009/09/30 v0.2 LaTeX Package (Mathematics font selection 
for XeLaTeX)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
amstext.sty    2000/06/29 v2.01
amsgen.sty    1999/11/30 v2.0
ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
fontspec.sty    2012/05/06 v2.2b Advanced font selection for     
XeLaTeX/LuaLaTeX
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
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
xparse.sty    2012/07/16 v3990 L3 Experimental document command parser
fontspec-patches.sty    2012/05/06 v2.2b Advanced font selection for 
XeLaTeX/Lu aLaTeX
fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty    2012/05/06 v2.2b Advanced font selection for     
XeLaTeX/LuaLaTeX 
fontenc.sty
eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many
other characters in Unicode lower plane
eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
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    2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def    2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)
fontspec.cfg
xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
microtype.sty    2011/08/18 v2.5 <beta-07> Micro-typographical refinements 
(RS)
microtype-xetex.def    2011/08/18 v2.5 <beta-07> Definitions specific to
xetex (RS)
microtype.cfg    2011/08/18 v2.5 <beta-07> microtype main configuration 
file (RS)
t3cmr.fd    2001/12/31 TIPA font definitions
mt-MinionPro.cfg    2005/02/07 v1.0 microtype config file for MinionPro
mt-cmr.cfg    2011/04/09 v2.1 microtype config. file: Computer Modern 
Roman(RS)
***********  

答案1

不要重新定义\normalsize。使用可选参数Scale

\setmainfont[Numbers=Lining, Ligatures=TeX, Scale=1.05]{Minion Pro}


如果需要,可以使用包 来定义其他行距setspace。但是,如果您更喜欢重新定义 ,\normalsize则使用:

\listfiles
\documentclass{article}

\usepackage[MnSymbol]{mathspec}
\usepackage{microtype}
\setmainfont[Numbers=Lining, Ligatures=TeX]{Minion Pro}
\setmathfont(Digits,Greek,Latin)[Numbers=Lining]{Minion Pro}
\makeatletter
\AtBeginDocument{%
\renewcommand\normalsize{%
   \@setfontsize\normalsize{10.5pt}{13pt}
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}}
\makeatother
\begin{document}

\[
\sum_{i=1}^\infty \alpha^i
\]

\end{document}

答案2

我也遇到了同样的问题。插入 fix-cm 包解决了该问题。

\RequirePackage{fix-cm}
\documentclass[12pt]{book}

相关内容