Actually this question asked many times before such as 1, 2, 3 and the article written in ShareLaTeX guides. However, I'm using the online editor and when I tried the solutions mentioned I still get an errors and no resulted file after compilation. It appears like the used packages is not recognized.

The last choice I tried is to use this in the preamble:

\newfontfamily\arabicfont[Script=Arabic, Scale=1.5]{Scheherazade}

and this for the Arabic text:

\textarab{نص عربي}

After compilation I got this error:


I tried the two compilers inside the yellow square but it didn't work

enter image description here

I opened a test project that has only this package and this was the result: as


It's worth to mention that I can't use the offline editor

Any thoughts about how to solve it?


  • 1
    Choosing one of yellow compilers should get rid of this error, if it doesn't work it is a sharelatex problem and you should ask its support. I suggest to make first a test with a minimal hello-world document with \usepackage{fontspec} but no arabic. – Ulrike Fischer Apr 27 '17 at 8:54
  • @UlrikeFischer The question has modified – F 505 Apr 27 '17 at 9:18
  • 1
    You should put at least the word "Hello World" in the document. Without it you don't get a page. – Ulrike Fischer Apr 27 '17 at 9:22
  • @UlrikeFischer I copied exactly the same code in [sharelatex.com/learn/Arabic] but it didn't produce the same result!! Seriously don't know what to do – F 505 Apr 27 '17 at 10:10
  • I told you what to do: Try first xelatex or lualatex and fontspec with some simple english (non empty!) document. – Ulrike Fischer Apr 27 '17 at 10:49

In the preamble:

\usepackage{bidi}%has to be last package to be load
\newfontfamily\Kayhan[Script=Arabic]{XB Kayhan}

Inside the document:

\textarab{نص عربي  }

Make sure that the compiler is (Xelatex).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.