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?
Asked
Active
Viewed 2,581 times
7
Espen Donali
- 959
1 Answers
5
You can modify the action of the BibTeX engine in the preferences of TeXworks, so that the argument line is
./auxfiles/$basename
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.
egreg
- 1,121,712
-
1But 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 '17 at 11:09
-
@A.Vieira My personal opinion is that using subdirectories and
\includeshould be avoided altogether – egreg Jul 18 '17 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 '17 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 '18 at 10:53
./auxfiles/$basenameas the argument for the BibTeX engine? What operating system are you using? – egreg Feb 27 '12 at 21:32