EDIT3: As of 2017-01-09, the bug has been fixed (see: https://sourceforge.net/p/miktex/bugs/2565/)
EDIT2: After contacting the miktex-users mailing list, it appears this is a current bug. Until it is resolved, please see my answer below for a workaround.
I have been using the following in a batch file to build my LaTeX documents for many months without issue:
@miktex-xelatex.exe -enable-enctex -enable-etex -enable-installer -enable-mltex
-enable-pipes -enable-write18 -synctex=1 -aux-directory=_build_files
-output-directory=./ "%1.tex"
Today, I updated (both as user and as admin) MiKTeX, which has a bunch of .exe
file updates/removals. Everything builds more or less properly, but the -aux-directory
option seems to have just completely stopped working when -output-directory
is present. It seems -output-directory
now acts like -aux-directory
AND overrides it.
I had been using -aux-directory
for all the build files, but still wanted -output-directory
for putting the .pdf
and .synctex.gz
output files. But, with the update, I can user either
@miktex-xelatex.exe -enable-enctex -enable-etex -enable-installer -enable-mltex
-enable-pipes -enable-write18 -synctex=1 -aux-directory=_build_files "%1.tex"
or
@miktex-xelatex.exe -enable-enctex -enable-etex -enable-installer -enable-mltex
-enable-pipes -enable-write18 -synctex=1 -output-directory=_build_files "%1.tex"
The problem here is that neither of these methods places the .pdf
and .synctex.gz
output files in the same directory as the .tex
file
It seems like this must be a bug? (it was working before the 2016-12-23 version of the files)
EDIT: It may have been introduced prior to 2016-12-23. After thinking about it... I'm not sure exactly how recently I updated MiKTeX and packages. Therefore, it might have be 1-2 versions earlier?