我正在使用套件polyglossia
和Xepersian
,我在第三級枚舉時遇到問題,我無法\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}
希望這可以幫助。