# How to use the fontspec package in a LaTeX document?

I'm trying to make a simple document which uses the fontspec package in

1. Tex Maker 4.4.1 with LuaLaTeX engine.

Code I'm using

    \documentclass{article}

\usepackage{fontspec}
\setmainfont{Arial}
\begin{document}

\section*{Introduction}
This is Introduction

\end{document}


I'm getting this error message (although I've checked LuaLaTeX Engine is set in the drop down menu)

Tex Maker

The fontspec package requires either XeTeX or LuaTeX to function.

You must change your typesetting engine to, e.g., "xelatex" or "lualatex" instead of plain "latex" or "pdflatex".

• The document is for lualatex and not for luatex. Check in miktex-settings if the lualatex format is enabled. Perhaps you will have to build it. There is type on the document, the command should be \setmainfont. – Ulrike Fischer Apr 13 '15 at 18:59