[Tex/LaTex] Compile with XeLaTeX in TeXstudio


I'm working with TexStudio + TexLive 2016, I believe that, among LaTeX editors, TeXstudio has the best user interface, even having a licensed version of WinEdt, I still prefer TeXstudio.

Now I'm compiling with XeLaTeX and LuaLaTeX. The result is OK when I use Winedt or TecnicCenter, but when I use TeXstudio to compile the following code:

\title{Equa\c{c}\~oes Diferenciais Ordinárias}
\author{Raimundo Benedito do Nascimento}

\chapter{Introdu\c cão}

I get the following error message:

Fatal fontspec error: "cannot-use-pdftex"
The fontspec package requires either XeTeX or LuaTeX.
You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
instead of plain "latex" or "pdflatex".
For immediate help type H <return>.

Could you help me, please?

Best Answer

Your code works if you compile it with Tools > Commands > XeLaTeX.

I have the Italian version of TeXstudio:

enter image description here

Related Question