LaTeXTools works for me when I do regular LaTeX files. But whenever I try building my XeLaTeX file, I get this output:
[Compiling /some/path/to/file.tex]
SimpleBuilder: pdflatex run 1; done.
Errors:
/usr/local/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty:43: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ }]
[Done!]
And when I look inside the Sublime console, this is what is written:
<module 'simpleBuilder' from '/Users/me/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/builders/simpleBuilder.py'>
<class 'simpleBuilder.SimpleBuilder'>
5
Welcome to thread Thread-167
['pdflatex', '-interaction=nonstopmode', '-synctex=1', 'resume']
Finished normally
1
Is there something I'm doing wrong? Any help would be appreciated.
Best Answer
You're using the
simple
builder, which is fine for some situations, but its important to understand that the simple builder really is just that, a simple builder: it builds LaTeX documents usingpdflatex
and, if necessary, runsbibtex
to generate a bibliography. That's it. Its actually intended as an example of how to write a builder than a fully featured builder itself and so there are a range of features that it does not and is unlikely to ever support.Currently, the only mechanism LaTeXTools provides to build a XeLaTeX document is to use the
traditional
builder.You can switch to by changing the
builder
option in yourLaTeXTools.sublime-settings
file totraditional
ordefault
or even just leaving it blank. You can also tweak this in your project settings file, if you use Sublime Text projects.Once you are using the
traditional
builder, you can tell LaTeXTools to usexelatex
by either:%!TEX program = xelatex
to the beginning of your document.or
In the
builder_settings
section of yourLaTeXTools.sublime-settings
(or thesettings
section of your project file) create aprogram
setting and set this toxelatex
. It should look something like this: