XeTeX 和 polyglossia:\normalfont 问题解决导致错误:未定义的控制序列。\selectlanguage *{latex}

XeTeX 和 polyglossia:\normalfont 问题解决导致错误:未定义的控制序列。\selectlanguage *{latex}

我必须使用 XeTeX,因为它有助于在文本和数学模式下设置任意字体(或新数学在数学模式下)。

我注意到该polyglossia软件包的命令有一个错误\normalfont这里是@egreg 对这个错误的详细描述。

在 MikTeX 中更新软件包(至较新版本)后polyglossia问题得到解决,但是出现了以下错误:

    Undefined control sequence. ...ctlanguage *[babelshorthands=true]{russian}
Undefined control sequence. ...ctlanguage *[babelshorthands=true]{russian}
Encoding scheme `' unknown. ...ctlanguage *[babelshorthands=true]{russian}
Undefined control sequence. ^^I\begin{document}
    Undefined control sequence. ^^I\begin{document}
        Encoding scheme `' unknown. ^^I\begin{document}
            Undefined control sequence. ^^I\begin{abstr}
                Undefined control sequence. ^^I^^I\par{\normalfont
                    Undefined control sequence. ^^I^^I\par{\normalfont
                        Encoding scheme `' unknown. ^^I^^I\par{\normalfont
                            Undefined control sequence. ^^I\end{abstr}
                        Undefined control sequence. ^^I\end{abstr}
                    Encoding scheme `' unknown. ^^I\end{abstr}
                Undefined control sequence. ^^I\end{document}
            Undefined control sequence. ^^I\end{document}
        Encoding scheme `' unknown. ^^I\end{document}
    Undefined control sequence. ...ctlanguage *[babelshorthands=true]{russian}
    Undefined control sequence. ...ctlanguage *[babelshorthands=true]{russian}
    Encoding scheme `' unknown. ...ctlanguage *[babelshorthands=true]{russian}
    Overfull \hbox (29.36624pt too wide) in paragraph

在 MWE 中:

        \documentclass[extrafontsizes,a4paper,*pt,oneside,openany]{memoir}
\usepackage{fontspec}   %[no-math] How can I use the Newton instead of newtxmath?
    %\usepackage{newtxmath} %math font of TNR type
    \usepackage{polyglossia}[2014/05/21]   
    \setmainlanguage[babelshorthands=true]{russian}  %
    \setotherlanguage{english}       
    \setmainfont{Arial} %% 
%   \setsansfont{Newton}                  
%   \setmonofont{Newton}
\newenvironment{abstr}{\small\itshape}{\normalfont\normalsize}
\begin{document}
\begin{abstr}
    \par{\normalfont Key \textbf{words}.} Hey!
\end{abstr}
\newcommand{\fn}{\expandafter\string\the\font}
{\normalsize\selectfont ха-хаха Book\_name\_ch\_AuthorsSurnames\fn}
\fontname\font\\
$ a+b$
\end{document}

这是一个很好的输出:在此处输入图片描述

如何避免这些错误?请帮帮我!

谨致问候,弗拉基米尔

UPD1MWE 已更新。

UPD2TexStudio 的屏幕截图

在此处输入图片描述

更新3:我按照@DavidCarlisle 和@UlrikeFischer 的建议查看了整个日志文件。之后我找到了解决方案这里

相关内容