缺失数字,视为零:在枚举中(多语种和 Xepersian)

缺失数字,视为零:在枚举中(多语种和 Xepersian)

我正在使用软件包polyglossiaXepersian,我在第三级枚举方面遇到了问题,我无法\Alph在整个文档中使用编号,

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

答案1

如果您对 MWE 进行轻微修改,它将解决错误。即更改:

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

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

这样就可以解决问题。因此,更新后的 MWE 为:

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

希望这可以帮助。

相关内容