In order to make my major folder containing my master .tex file more clean, I have set Texworks to store all auiliary files in a subfolder called auxfiles. This was done by adding the following command line -aux-directory=./auxfiles into the Arguments list for the pdfLaTex processing tool in TexWorks (detailed explanation given in: How can I put .aux files in separate folder using a command inside TexWorks?). However, after having done this BibTEx is no longer able to find the auxiliary files it needs. How do I make BibTex find the auxiliary files it needs, and in addition put its output into the auxfiles directory?

  • Did you try with ./auxfiles/$basename as the argument for the BibTeX engine? What operating system are you using?
    – egreg
    Feb 27, 2012 at 21:32

1 Answer 1


You can modify the action of the BibTeX engine in the preferences of TeXworks, so that the argument line is


instead of simply $basename.

However, I suggest you to duplicate the engines: one normal BibTeX and another one, say BibTeX-AUX, that is modified in this way. Thus you'll be able to use both approaches.

  • 1
    But there's an issue. main.aux, the resulting .aux from compiling the main project, placed in ./auxfiles/, has relative references inside it to other parts of the project, like \@input{./part1.aux}. This confuses bibtex as the correct location should be \@input{./auxfiles/part1.aux}. So, the compiler is not creating a correct main.aux for bibtex to use! How to solve this?
    – A. Vieira
    Jul 18, 2017 at 11:09
  • @A.Vieira My personal opinion is that using subdirectories and \include should be avoided altogether
    – egreg
    Jul 18, 2017 at 11:23
  • @egrep I agree now, but without it the compilation directory is a mess... Latex is so unclean with everything unfortunately.
    – A. Vieira
    Jul 18, 2017 at 12:59
  • In response to A. Viera's follow up question on how to manage included files from a master document: tell bibtex to include the corresponding base-directory (in your case auxfiles) with the addition of: -include-directory=auxfiles So the complete command will be something like: bibtex.exe auxfiles/% -include-directory=auxfiles
    – Padde
    Jun 21, 2018 at 10:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.