![如何将 empheq 与 unicode-math 一起使用?](https://linux22.com/image/279858/%E5%A6%82%E4%BD%95%E5%B0%86%20empheq%20%E4%B8%8E%20unicode-math%20%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8%EF%BC%9F.png)
我尝试将引擎从 更改pdfLaTeX
为XeLaTeX
,但无法编译一个简单的项目:
\documentclass[10pt]{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage{unicode-math}
\usepackage{fontspec}
\setmainfont[
Ligatures=TeX,
Extension=.otf,
UprightFont= *-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic]{texgyrepagella}
\setmathfont[Extension=.otf]{texgyrepagella-math}
\usepackage{empheq}
\author{}
\title{}
\date{}
\begin{document}
\maketitle
\end{document}
但它会产生错误:
Command \dddot already defined. \hbox{\normalfont ...}\vss}}}}
Command \ddddot already defined. \hbox{\normalfont....}\vss}}}}
Extended mathchar used as mathchar (4203026) \mathchardef\std@minus\mathcode`\-\relax
Command \overleftrightarrow already defined. ...palette{\overarrow@\leftrightarrowfill@}}
Command \underrightarrow already defined. ...athpalette{\underarrow@\rightarrowfill@}}
Command \underleftarrow already defined. \mathpalette{\underarrow@\leftarrowfill@}}
Command \underleftrightarrow already defined. ...alette{\underarrow@\leftrightarrowfill@}}
答案1
您需要empheq
先加载unicode-math
,以便它可以定义这些命令,然后 unicode-math 将它们更改为在 xetex 中工作。而不是反过来,您会得到错误,因为您显示为empheq
放弃,因为unicode-math
已经定义了一些东西。