1

I am trying to use 'subequations' environment in my document but it fails to do it right. It appears to happen whenever hebrew language is used somewhere in the document. Here is a 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}

If the hebrew part is removed the problem disappears.

1

I found some workaround. The following code produces a proper result:

\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}
1

Setting \@Latintrue is good anyway, but this can also be solved by avoiding the explicit \selectlanguage switches:

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.