Preamble: Setting the output directories
TeX distros have the useful command line option
--output-directory to create all output files in a specified directory.
MikTeX provides an even more convenient option to put only temporary material in a separate folder, which can be eventually deleted, that is:
pdflatex --aux-directory=auxdir mybook
--aux-directory is particularly convenient for large projects with several TeX files, for example a book with several chapters, to reduce post-compilation clutter.
One can use together
Below I will address
--aux-directory, but using
--output-directory or both produces the same issue.
Using bibliographies when output/aux directories are diverted
I haven't yet tried them, but I am aware of
--output_directory option, which should do similar jobs in
As regards BibTeX, there are no such options. For a simple project, based on a single
.tex file (and therefore
.aux), depending on your path separator,
bibtex auxdir/mybook bibtex auxdir\mybook
should work. If there are several
.tex files (when the aux dir is actually useful),
bibtex is unable to find the other aux files, which will still be searched in the project's root dir.
It is possible to cd to
auxdir, but in this case the
.bst files will not be found.
A workaround consists in copying them in the
auxdir. That works, but it is against the purpose of such directory and also time-consuming, as the original
.bib file in the parent directory is likely to be updated often.
What is the correct workflow for bibtex and biber when the
--output-directory) option is employed?