I tried for hours to use vimtex
to compile a document that requires XeLaTeX. As the vimtex
documentation says, the first line of my TeX document is %! TEX program = xelatex
. However, I always get the following error:
/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty|43 error| Fatal fontspec error: "cannot-use-pdftex"
So it look like PdfLaTeX is still used. Note that building a document that only requires PdfLaTeX work perfectly, and that the document I try to build with XeLaTeX is just a "Hello world" using a class that needs XeLaTeX and that compiles with xelatex file.txt
command in a terminal.
%!TEX TS-program = xelatex
and%!TEX encoding = UTF-8 Unicode
on two first lines?