I use Neovim with the vimtex plugin and latexmk
but I want to make it use XeLaTeX by default instead of PDFLaTeX because I have to use fontspec
quite often for my college papers. I use TeX Live.
[Tex/LaTex] How to set XeLaTeX as the default engine
latexmktexlivevimxetex
Best Answer
The variable
$pdf_mode
is responsible for the engine used to generate pdfs. You have to set$pdf_mode
to 5 if you want to use XeLaTeX. You can do that by adding the following line to your configuration file (i.e.$HOME/.latexmkrc
):Possible values for
$pdf_mode
are:This is well documented in the manual, which you can access either with
man latexmk
or, with TeX Live,texdoc latexmk
.