I'd like to have a dedicated output folder out for all the aux/log files that I'm not gonna read anyways.

My environment/workflow is: texstudio + miktex/texlive + pdftex + bibtex.

I read that I ahve to use cli flags of pdflatex and bibtex like this:

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

bibtex.exe out/%.aux

However, with my folder structure:

  |   |__one
  |      |__one_one.aux
  |      |__one_two.aux
  |__ ...

The aux/log files are at the desired location, but bibtex raises the following error:

Process started: bibtex.exe out/"main".aux

This is BibTeX, Version 0.99d (MiKTeX 2.9.7050 64-bit)
The top-level auxiliary file: out/main.aux
I couldn't open auxiliary file chapters/one/one_one.aux
---line 2 of file out/main.aux
 : \@input{chapters/one/one_one.aux
 :                                 }
I'm skipping whatever remains of this command
The style file: plain.bst
I found no \citation commands---while reading file out/main.aux
Database file #1: bib.bib
(There were 2 error messages)

It seems that the aux files are not referenced correctly, so answers like in this thread don't work in my texstudio environment.

Is there a (somewhat easy to replicate) fix for my problem?

  • 1
    the easiest fix is not to use the aux/out option. I never do. Imho it makes more problems than it solves. Jul 11, 2019 at 22:37
  • 1
    What I don't understand is how anyone though it would be a good idea to NOT have a dedicated build directory. Latex is error prone. Aux files can be corrupted. Deleting them solved non-existing errors MANY times. The fact that this hasn't been solved in the last 20 years shows how user unfriendly latex still is. So having a dedicated build directory would defnitely provide tangible benefits. If there is an error that shouldn't exist, I could simply delete the content of the build directory and do a 'clean' build to check the validity of the error.
    – Zapnuk
    Jul 12, 2019 at 8:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.