I compile a document with this command:

    latexmk -outdir=obj these.tex

In these.tex, I specify \bibliography{../Bibliography}. But, when latexmk calls bibtex, the .aux file is one folder deeper and, hence, the compiler doesn't find the file.

Indeed, if in my .tex file I use \bibliography{../../Bibliography} then everything works fine for bibtex, but latexmk fails to find the file. Using -auxdir=obj doesn't change anything.

What can I do ?

edit: it seems important to precise that latexmk is called via a makefile.

  • Why not use a place that is simply searched by default? Using kpsewhich --var-value TEXMFHOME gives me ~/texmf, which means I'd put my bibliography (or a symlink even) in ~/texmf/bibtex/bib; then latex, latexmk, etc. will all find the file regardless of all the other jiggering I might want to do with other files...
    – jon
    Commented Apr 24, 2014 at 15:35

1 Answer 1


In your project root, create a .latexmk file with the following contents:

$bibtex = "bibtex -include-directory=.. %O %B";

This tells bibtex, which is executed in the obj directory, to look for *.bib files in ../obj.

  • BibTeX (version 0.99d (TeX Live 2017), kpathsea version 6.2.3) does not seem to support the option -include-directory.
    – Neal Young
    Commented Oct 3, 2017 at 3:06
  • Works for BibTeX 0.99d (TeX Live 2020/Debian) kpathsea version 6.3.2 and Latexmk, John Collins, 29 September 2020. Version 4.70b Commented Oct 25, 2021 at 3:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .