# The fontspec package requires either XeTeX or LuaTeX to function [closed]

I am not an expert in LaTeX, but I was writing a paper, everything was going fine, until it suddenly crashed giving me the error:

The fontspec package requires either XeTeX or LuaTeX to function.

## closed as too localized by lockstep, Stefan Kottwitz♦Oct 18 '12 at 12:20

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

• That means that you have to use `xelatex <document>` or `lualatex <document>` instead of `pdflatex <document>` to compile your document if you want to use the `fontspec` package. For some background, try tex.stackexchange.com/q/36/86 – Loop Space Oct 4 '12 at 8:49
• This can't have happened suddenly. Either you changed how you compile your document (now using `pdflatex` instead of `xelatex` for example) or you added `fontspec` explicitly or a package that loads `fontspec` implicitly. – clemens Oct 4 '12 at 11:07
• As the error message said, LuaLaTeX or XeLaTeX should be used. Probably it wasn't the case. Since no further information was given, the question will now be closed as too localized. – Stefan Kottwitz Oct 18 '12 at 12:20
• @Stefan I tried compile a document with `XeLaTeX` and got this warning. – Tyson Williams Aug 8 '13 at 20:26