1

I routinely use -output-directory=_out in TeX Live.

Now, I have noticed that this becomes an issue with revtex4-1, which generates a \jobname Notes.bib (apparently, in that output folder) but does not seem to find it there. I have to manually copy _out\jobname Notes.bib back next to the .tex file to make a simple document compile without missing footnotes:

\documentclass{revtex4-1}
\begin{document}
    \footnote{Hello, world!}
\end{document}

A very similar situation is this MWE:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{SomeOne, author = {Some One}, year = {2018}}
\end{filecontents}

\begin{document}
    Text \cite{SomeOne}
    \bibliography{\jobname}
\end{document}

Again, _out/\jobname.bib is created, but not found until I copy it from the output folder next to the .tex file. This cannot be intended.

Is there a generic fix to this, either by having the -output-directory not apply to some commands, or by increasing the search path of the \bibliography command? Or is this a bug in TeX Live? I do not remember having this problem with MiKTeX, where I used separate auxiliary and output directories.

This answer implies a bibtex argument called --include-directory, but it does not seem to exist in TeX Live.

bers
  • 5,404

1 Answers1

1

I believe setting BIBINPUTS=.;.\_out fixed the issue; this is inspired by this answer. Note that I used semicolons ; to separate the entries, while the other answer uses colons :.

bers
  • 5,404
  • 1
    In TeX Live on Unix systems, using colons or semicolons is the same (for compatibility with Windows that only accepts semicolons). The enviroment variable should be set with BIBINPUTS="./_out;" (use the correct quoting for Windows, or no quotes), so also other bib files can be found. – egreg Jun 21 '18 at 17:30