Sublime Forum

LatexTools ignores !TEX program directive

#1

The directive %!TEX program = lualatex in my source file is ignored and instead the build engine defaults to pdflatex:

The documentation says that this functionality will not work if the option command in LaTeXTools.sublime-settings has been changed. I have not changed that option as far as I remember, but I cannot locate it either to see how it is currently set. Searching for command in LaTeXTools.sublime-settings gives 21 hits but none looks relevant.

0 Likes

#2

Have you tried building as LaTeX - Traditional, in addition to adding the directive you have on the top of the file? If you look at the documentation, it is the default builder (also known as the “traditional” builder) that supports additional features, as the one you are using. It is working for me.

0 Likes

#3

Thanks-- t worked for me too!

BTW, Traditional invokes latexmk. What it I want a basic pdflatex or lualatex?

0 Likes

#4

Have you tried Tools -> Build With... and select LaTeX - Basic Builder - PdfLaTeX (or LaTeX - Basic Builder - LuaLaTeX)? It will invoke pdflatex, biber/bibtex if necessary, and then pdflatex again if necessary. In other words, it will run pdflatex only once if it is all that it takes.

0 Likes