0

I am using the following template for my thesis Thesis Template-click here . This template is for the English language, but I want to include the Arabic langue as a second language, I tried every solution provided by overleaf in this URL: Arabic, but none of the solutions work for me, I don't understand exactly where is the problem, especially there is a class file for this template, can anyone help me by identifying the error in this template after I added Arabic.

Some of the compilation errors are presented below, please feel free to view and edit the template if neccery, this is urgent to me.

  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.
2
  • The first error message says that you load the hyperref package after bidi, but it should be the other way around. Have you tried to switch the two commands?
    – gernot
    Nov 14, 2021 at 18:50
  • I can't find the so-called bidi package, can you help me find it by accessing the link of the template overleaf.com/2692124758qfrtrvgwtxgk
    – Mai
    Nov 14, 2021 at 20:52

1 Answer 1

1

In main.tex, uncomment the option nohyperref in the \documentclass command. Moreover, add the line

\usepackage{hyperref}

before the line

\setotherlanguage{arabic}

(just above \begin{document}). This will resolve the first error message. The other errors are the result of not loading an appropriate font for the arabic letters.

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

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

Just in case someone wonders: Without the option nohyperref, the class MastersDoctoralThesis loads the package hyperref \AtBeginDocument.

2
  • what tag to use with the Arabic language, as the problem is with \textarabic
    – Mai
    Nov 14, 2021 at 21:11
  • @Mai I have no experience with Arabic languages. Either search the forum for how to install them, or ask at your university.
    – gernot
    Nov 15, 2021 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .