我发现了一种无法解释的行为。在编译 MWE 时
\listfiles
\documentclass{article}
%\usepackage{fontspec}
\title{foo\thanks{bar}}
\author{baz\thanks{qux}}
\setlength{\textheight}{2.25in} % just for the example
\begin{document}
\maketitle
\end{document}
使用 XeLaTeX 或 LuaLaTeX,结果符合预期:
对应文件列表:
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
***********
但是,取消注释\usepackage{fontspec}
并使用 XeLaTeX 或 LuaLaTeX 进行编译会导致
对应文件列表:
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
fontspec.sty 2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX
expl3.sty 2015/02/13 v5524 L3 programming layer (loader)
expl3-code.tex 2015/02/13 v5524 L3 programming layer
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
l3unicode-data.def 2015/02/12 v5523 L3 Unicode data
l3xdvipdfmx.def
xparse.sty 2014/11/25 v5471 L3 Experimental document command parser
fontspec-patches.sty 2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTe
X
fontspec-xetex.sty 2014/06/21 v2.4a Font selection for XeLaTeX and 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 oth
er characters in Unicode lower plane
eu1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2014/10/28 v1.0p 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 2014/07/25 v4.03 LaTeX color/graphics driver for XeTeX (RRM/JK)
fontspec.cfg
t3cmr.fd 2001/12/31 TIPA font definitions
***********
如您所见,fontspec
加载时仅使用一个不同的脚注标记。即使我使用\setmainfont
和/或朋友加载系统字体,也会发生这种情况。我在 Windows 7 上使用 vanilla TeX Live 2014(今天更新)。
这种行为是否有原因,或者我的设置是否存在问题?或者这是一个需要报告的错误?
答案1
问题在于fontspec-patches.sty
重新定义\@fnsymbol
为受保护的函数,而它应该是完全可扩展的:
\listfiles
\documentclass{article}
\usepackage{fontspec}
\ExplSyntaxOn
\cs_set:cpn {@fnsymbol} #1 % NOT \cs_set_protected:cpn !!!
{
\int_case:nnF {#1}
{
{0} {}
{1} { \mode_if_math:TF *\textasteriskcentered }
{2} { \mode_if_math:TF \dagger\textdagger }
{3} { \mode_if_math:TF \ddagger\textdaggerdbl }
{4} { \mode_if_math:TF \mathsection\textsection }
{5} { \mode_if_math:TF \mathparagraph\textparagraph }
{6} { \mode_if_math:TF \|\textbardbl }
{7} { \mode_if_math:TF {**}{\textasteriskcentered\textasteriskcentered} }
{8} { \mode_if_math:TF {\dagger\dagger}{\textdagger\textdagger} }
{9} { \mode_if_math:TF {\ddagger\ddagger}{\textdaggerdbl\textdaggerdbl} }
}
{ \@ctrerr }
}
\ExplSyntaxOff
\setlength{\textheight}{2.25in} % just for the example
\begin{document}
\title{foo\thanks{bar}}
\author{baz\thanks{qux}}
\maketitle
\end{document}
保护应处于值,不在主要功能中。