Número faltante, tratado como zero: em enumerar (poliglossia e Xepersian)

Número faltante, tratado como zero: em enumerar (poliglossia e Xepersian)

Estou usando os pacotes polyglossiae Xepersianestou com um problema com enumeração de terceiro nível, não consigo usar \Alphnumeração no documento inteiro,

\documentclass[12pt,a4paper]{book}
\usepackage[nonamebreak, square, comma, sort&compress]{natbib}
\usepackage{polyglossia}
\setmainlanguage[calendar=gregorian, numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Amiri}
\setotherlanguage{english}


\usepackage{xepersian}
\settextfont{Amiri}
\setlatintextfont[Scale=1.5]{Amiri}



\let\oldthebibliography=\thebibliography
  \let\endoldthebibliography=\endthebibliography
  \renewenvironment{thebibliography}[1]{%
    \begin{oldthebibliography}{#1}%
      \setlength{\parskip}{2ex}%vertical space between items
        }%
  {%
    \end{oldthebibliography}%
  }

\begin{document}

 كز هنا في الحديث على  نظام زي‌تك لأنه أحد أفضل الحلول المتاحة  \citep{ماجدة2012تطوير}
 نفترض هنا وجود معرفة مسبقة
 \cite{kopka2004guide}
 \begin{enumerate}
\item Test one
\item Test two
\begin{enumerate}%problem
\item Test one one
\item Test two two
\end{enumerate}%problem
\item Test three
\item Test four
\end{enumerate}

\bibliographystyle{asa-fa}

\bibliography{MyReferences}

\end{document}

Responder1

Se você fizer uma ligeira modificação em seu MWE, o erro será resolvido. ou seja, mudar:

\setmainlanguage[calendar=gregorian, numerals=maghrib]{arabic}

para

\selectlanguage[calendar=gregorian, numerals=maghrib]{arabic}

Isto resolverá o problema. Portanto, o MWE atualizado é:

\documentclass[12pt,a4paper]{book}
\usepackage[nonamebreak, square, comma, sort&compress]{natbib}
\usepackage{polyglossia}
\selectlanguage[calendar=gregorian, numerals=maghrib]{arabic}
%\setmainlanguage[calendar=gregorian, numerals=maghrib]{arabic}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Amiri}
\setotherlanguage{english}
\TOCLanguage{arabic}


\usepackage{xepersian}
\settextfont{Amiri}
\setlatintextfont[Scale=1.5]{Amiri}


\let\oldthebibliography=\thebibliography
\let\endoldthebibliography=\endthebibliography
\renewenvironment{thebibliography}[1]{%
\begin{oldthebibliography}{#1}%
  \setlength{\parskip}{2ex}%vertical space between items
    }%
{%
\end{oldthebibliography}%
}

\begin{document}

 كز هنا في الحديث على  نظام زي‌تك لأنه أحد أفضل الحلول المتاحة  \citep{ماجدة2012تطوير}
 نفترض هنا وجود معرفة مسبقة
 \cite{kopka2004guide}
\begin{enumerate}
\item Test one
\item Test two
\begin{enumerate}%problem
\item Test one one
\item Test two two
\end{enumerate}%problem
\item Test three
\item Test four
\end{enumerate}

\bibliographystyle{asa-fa}

\bibliography{MyReferences}

\end{document}

Espero que isto ajude.

informação relacionada