添加阿拉伯语双向错误

添加阿拉伯语双向错误

我在论文中使用以下模板论文模板-点击此处。此模板适用于英语,但我想包含阿拉伯语作为第二语言,我尝试了此 URL 中 overleaf 提供的所有解决方案:阿拉伯,但是这些解决方案对我都不起作用,我不明白问题到底出在哪里,特别是这个模板有一个类文件,在我添加阿拉伯语后,有人能帮我识别这个模板中的错误吗?

下面列出了一些编译错误,如有必要,请随时查看和编辑模板,这对我来说很紧急。

  Package bidi Error: Oops! you have loaded package hyperref after bidi package. Please load package hyperref before bidi package, and then try to run xelatex on your document again.

See the bidi package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.155 \begin{document}
                      
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.


Package polyglossia Error: The current latin font NotoKufiArabic(0) does not contain the "Arabic" script!

(polyglossia)                Please define \arabicfont with \newfontfamily command.

See the polyglossia package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.21 ... 1 &       \textarabic{البرامج والتطبيقات}
                                                     \\
(That was another \errmessage.)

Missing character: There is no ا (U+0627) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ل (U+0644) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ب (U+0628) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ر (U+0631) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ا (U+0627) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no م (U+0645) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ج (U+062C) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no و (U+0648) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ا (U+0627) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ل (U+0644) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ت (U+062A) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ط (U+0637) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ب (U+0628) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ي (U+064A) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ق (U+0642) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ا (U+0627) in font [lmsans10-regular]:mapping=tex-text;!
Missing character: There is no ت (U+062A) in font [lmsans10-regular]:mapping=tex-text;!
LaTeX Info: Redefining \rmfamily on input line 21.
LaTeX Info: Redefining \sffamily on input line 21.
LaTeX Info: Redefining \ttfamily on input line 21.
LaTeX Info: Redefining \rmfamily on input line 22.
LaTeX Info: Redefining \sffamily on input line 22.
LaTeX Info: Redefining \ttfamily on input line 22.

答案1

在 中,取消注释命令中的main.tex选项。此外,添加以下行nohyperref\documentclass

\usepackage{hyperref}

线前

\setotherlanguage{arabic}

(就在上方\begin{document})。这将解决第一个错误消息。其他错误是由于没有为阿拉伯字母加载适当的字体造成的。

\documentclass[
...
nohyperref, % Uncomment to not load the hyperref package
...
]{MastersDoctoralThesis} % The class file specifying the document structure

...
\usepackage{hyperref}
\setotherlanguage{arabic}
\begin{document}
...

以防有人感到疑惑:如果没有选项nohyperref,类MastersDoctoralThesis就会加载包hyperref \AtBeginDocument

相关内容