3

with this MWE

\documentclass{article}
\usepackage{enumerate}
\usepackage{fontspec}
\usepackage{polyglossia}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\setdefaultlanguage{arabic}
\setotherlanguage{english}
\begin{document}

\begin{english}
\begin{enumerate}[{example}- a)]
\item text
\item text
\item text
\item text
\end{enumerate}
\end{english}

\end{document}

compiled with XeLaTeX labels 'a','b',... Does not appear in the output enter image description here

Is there a solution to this problem?

Salim Bou
  • 17,021
  • 2
  • 31
  • 76

1 Answers1

2

When the default language is Arabic, polyglossia redefines \@alph to use Arabic letters, but apparently it does not restore the definition when english is used.

There should be a better way to do this, but until there isn't, use the following:

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{enumitem}

\makeatletter
\appto\blockextras@english{%
  \let\@savealph\@alph
  \let\@alph\@origalph
}
\appto\noextras@english{\let\@alph@savealph}
\makeatother

\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\setdefaultlanguage{arabic}
\setotherlanguage{english}

\begin{document}

\begin{english}
\begin{enumerate}[label=example-\alph*)]
\item text
\item text
\item text
\item text
\end{enumerate}
\end{english}

\end{document}

Also enumerate would work, but enumitem is more powerful.

enter image description here

egreg
  • 1,121,712