[Tex/LaTex] TexStudio + Bibtex + build/auxiliary folder

auxiliary-filesbibtextexstudio

Specs

Win7 64b – TexStudio 2.9.4 – Miktex

Problem

Bibtex does not find *.aux file when I export my auxiliary files into a different directory, e.g. /auxiliary.

With current folder structure:

root/
|_ main.tex
|_ bibliography.bib
|_ auxiliary/
|_ *aux
|_ ...

PS. This solution is related to Texstudio + Biber + build folder but different enough to provide exact settings here. Also, closely related to How can Bibtex find the auxiliary files it needs when these are stored in a subdirectory?

Best Answer

Assuming the folder structure in the question, you should have the following configs.

Under Options > Configure TexStudio ...> Commands

  • PdfLatex: pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex -aux-directory=./auxiliary/
  • BibTex: bibtex.exe ./auxiliary/%

Under Options > Configure TexStudio ...> Build (after you checked Show Advanced Options on the bottom-left corner):

  • Add ./auxiliary/ into the Log File text-box in the lower pane with the Build Options.

Note: this does not work if you use external applications such as gnuplot. The external application won't be able to find the required build files now present outside of the root directory.