[tex-live] bug report of bibtex
John Collins
jcc8 at psu.edu
Tue May 8 02:43:24 CEST 2018
On 5/7/18 5:52 PM, Karl Berry wrote:
> You can directly run latexmk in the source folder
>
> Like Akira, the standard sequence worked for me:
>
> pdflatex --output-dir=output source.tex
> bibtex output/source
> pdflatex --output-dir=output source.tex
> pdflatex --output-dir=output source.tex
>
> bibtex found ../Library.bib ok.
>
> I can only suggest reporting this to the latexmk maintainer.
Latexmk maintainer here.
For normal documents that sequence of commands does work. Unfortunately
the bibtex run fails if the document uses \include. Then there are
extra .aux files and output/source.aux inputs them, by commands like
\@input{chapter1.aux}
When you invoke bibtex by
bibtex output/source
it doesn't find the extra .aux files.
To work around this, latexmk effectively does the following
sets BIBINPUTS and BSTINPUTS to include the current directory
cd output
bibtex source
cd back to the original directory
undo the setting of BIBINPUTS and BSTINPUTS
I didn't see any simpler way of handling this. The solution has worked
for me for a long time.
However, the solution fails if a .bib file is specified in a
\bibliography command relative to the document directory; that is the
OP's problem.
I don't see a general purpose solution other than to create appropriate
symlinks in the output directory, which is (a) a fudge and (b) OS
dependent as to whether it works.
What would be nice would be for bibtex to change its behavior to look
for the other input files in the directory of the primary aux file. But
that's not what it does. Is there some setting of bibtex that I am
missing? Has someone a better idea?
John Collins
More information about the tex-live
mailing list