Update: LaTeXTools now supports aux_directory
and output_directory
via settings or using comments such as %!TEX output_directory = out_dir
. There are a few caveats to this support which are included in the documentation.
LaTeXTools doesn't support -aux-directory
or -output-directory
(yet). However, if you can stomach having a couple of symbolic links in the same directory as your main tex document, you can use something like roeeebar's suggestion from this issue, which adds a settings block to your sublime-project file (I've modified this for Windows, but I haven't tested it).
"settings": {
"builder": "script",
"builder_settings":
"windows": {
"script_commands": [
"latexmk -cd -f -xelatex -synctex=1 -interaction=nonstopmode -auxdir=Aux -outdir=Output $file_name",
"mklink Output\\$file_base_name.pdf .",
"mklink Output\\$file_base_name.synctex.gz .",
"mklink Aux\\$file_base_name.log ."
]
}
}
}
This basically places symbolic links to the appropriate files where LaTeXTools expects to find them, so it should continue to work as expected.
A couple of notes:
latexmk
is not installed by default on MiKTeX. It's easily installable using the package manager, but because it's a Perl script, you'll also need a version of Perl, such as Active Perl or Strawberry installed and on your %PATH%
to get it working. Unfortunately, the usual builder LaTeXTools uses on MiKTeX (texify
) will stop with a fatal error if you try to pass it the -aux-directory
or -output-directory
flags.
You may need to alter the latexmk
command of you are not using xelatex
.