4

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?

Oleg
  • 367

2 Answers2

5

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.

Oleg
  • 367
3

Just if anyone needs the same under Linux, the option for PdfLatex has different name in TeXLive. Under Options > Configure TexStudio ...> Commands for PdfLatex one should put:

pdflatex -synctex=1 -interaction=nonstopmode -output-directory=auxiliary %.tex

Also if you want to see your PDF in the built-in viewer window, under Options > Configure TexStudio ...> Build put auxiliary for PDF File too.