我试图在我的文档中使用“子方程”环境,但无法正确执行。每当文档中的某处使用希伯来语时,似乎都会发生这种情况。以下是 MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Arial}
\begin{document}
\selectlanguage{hebrew}
אבג
\selectlanguage{english}
\begin{subequations}
\begin{align}
x+y=1\\
x-y=2
\end{align}
\end{subequations}
\end{document}
如果删除希伯来语部分,问题就消失。
答案1
我找到了一些解决方法。以下代码产生了正确的结果:
\documentclass{article}
\usepackage{amsmath}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Arial}
\makeatletter
\@Latintrue
\makeatother
\begin{document}
{
\selectlanguage{hebrew}
אבג
}
\selectlanguage{english}
\begin{subequations}
\begin{align}
x+y=1\\
x-y=2
\end{align}
\end{subequations}
\end{document}
答案2
无论如何,设置\@Latintrue
都是好的,但这也可以通过避免显式\selectlanguage
切换来解决:
\documentclass{article}
\usepackage{amsmath}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Arial}
\begin{document}
\begin{otherlanguage}{hebrew}
אבג
\end{otherlanguage}
\begin{subequations}
\begin{align}
x+y=1\\
x-y=2
\end{align}
\end{subequations}
\end{document}