# XeTeX not recognizing some commands, yet output is fine

I am trying an example of Arabic script in XeTeX. I use TeXstudio. The output is displayed fine, but there are some "unrecognized commands".

MWE:

\documentclass[a4paper,12pt]{article}
\usepackage{polyglossia}
\setmainlanguage{arabic}
\setotherlanguage{english}
\setmainfont[Ligatures=TeX]{Amiri}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}

\title{مثال بسيط Example Simple}
\author{اسمي}

\begin{document}
\maketitle
\section{القسم الأول}
هنا نبدأ باسم الله. وهذه كلمة انجليزية: Hi تعني: مرحباً.\\
\textenglish{I am here.}
\end{document}


The unrecognized commands (highlighted in RED in TeXstudio) are: \setmainlanguage, \newfontfamily\arabicfont and \textenglish. There are NO error messages though.

• The MWE is always appreciated, but perhaps some verbatim snippets of your error messages from the .log would also be helpful here. – jon May 11 '14 at 21:06
• There are no error messages! "Process started: xelatex.exe -synctex=1 -interaction=nonstopmode "Arabic".tex Process exited normally" TexStudio highlight the above mentioned commands in RED. I have edited my question. – student1 May 11 '14 at 21:08
• TeXStudio doesn't know all possible commands. – egreg May 11 '14 at 21:15
• If so, how do TexStudio use the commands? or it just passes them to XeTex? – student1 May 11 '14 at 21:26
• I doubt TeXStudio 'does' anything that sophisticated (but I've never used it). If the document compiles fine, then I think egreg's point is that it uses a syntax highlighting that indicates when you might(!) be using an incorrect command, not that you are, for certain, using an incorrect command. Do you get the same result when you have something like \wencommnad..? – jon May 12 '14 at 2:29