[texhax] Puzzle: bibtex working when it *shouldn't*!!! ???

Rolf Turner r.turner at auckland.ac.nz
Mon May 7 00:37:06 CEST 2018


In a paper that I recently processed in my capacity as Technical Editor,
the authors specified the name "references.bib" in their \bibliography{} 
command.  The copy editor processed the LaTeX file using MiKTeX and got
a complaint that it couldn't find "references.bib.bib" --- which indeed
it couldn't!   So the processing came to a shuddering halt.

I could not figure out what the hell was going on, since everything 
worked OK for *me*.  (I run pdflatex and bibtex from the command line,
under Ubuntu Linux.)

Fortunately the copy editor very cleverly figured out the problem,
replaced "\bibliography{references.bib}" by "\bibliography{references}"
and all was well.

Just out of idle curiosity, I would like to gain some insight as to 
*why* things worked for me when it seems they shouldn't have.  (If 
bibtex had thrown the same error at me as MiKTeX threw at the copy 
editor I would *probably*  have been able to figure things out and
remove the spurious ".bib" before sending the paper "into production".
I would thereby have saved the copy editor a great deal of wasted time
and hair-tearing.)

So has anyone any explanation as to why one can get away with the 
spurious/redundant ".bib" when running bibtex from the command line,
but not when running it under MiKTeX?

I noticed (*after* the fact :-( ) that when I do the bibtex thing
from the command line I get:

> This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
> The top-level auxiliary file: anzs12230_e.aux
> The style file: anzsj.bst
> Database file #1: references.bib.bib

So it *says* that it is looking for "references.bib.bib" (which I never 
noticed.  Psigh!).  But it apparently happily *uses* "references.bib", 
since it produces citations and a bibliography and gets everything 
right.  Weird.

As I say, this is idle curiosity, so don't anyone waste too much time on 
the issue if the explanation is not immediately obvious.

cheers,

Rolf Turner

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276


More information about the texhax mailing list