3

I have spent a rather frustrating few hours trying to get TexWorks to work with either or both of BibTex or biber.

I tried running the minimal example

\documentclass[12pt]{article}
\usepackage{natbib}

\begin{document}

\title{BibTeX in action}
\author{Martin J. Osborne}
\date{2008-1-13}

\maketitle

\section{Introduction}
This document illustrates the use of BibTeX\@.  You may want to refer to \cite{ahu61} or \cite{ab94} or \cite{m85}.  Or you may want to cite a specific page in a reference, like this: see \citet[p.~199]{m85}.  Or perhaps you want to cite more than one paper by Maskin: \cite{m85, m99}. Or you want to make a parenthetical reference to one or more articles, in which case the \verb+\citealt+ in the \texttt{te.bst} bibliography style omits the parentheses around the year (\citealt{ahu61}).

\bibliographystyle{plain}

\bibliography{bibl}

\end{document}

with .bib file

@article{ahu61,
   author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
   title={Constraint qualifications in maximization problems},
   journal={Naval Research Logistics Quarterly},
   volume={8},
   year = 1961,
   pages = {175-191}
 }

@book{ab94,
   author = {Charalambos D. Aliprantis and Kim C. Border},
   year = {1994},
   title = {Infinite Dimensional Analysis},
   publisher = {Springer},
   address = {Berlin}
 }

@incollection{m85,
   author={Maskin, Eric S.},
   year={1985},
   title={The theory of implementation in {N}ash equilibrium: a survey},
   booktitle={Social Goals and Social Organization},
   editor={Leonid Hurwicz and David Schmeidler and Hugo Sonnenschein},
   pages={173-204},
   publisher={Cambridge University Press},
   addess={Cambridge}
 }

called bibl.bib and in the same directory. Running pdfLaTeX gives me a perfectly good file with missing citations, but when running BibTeX it responds I couldn't open database file bibl.bib.

I think this might be some kind of bigger configuration issue with TeXWorks, because earlier on in the troubleshooting process I tried similar things with biber and biblatex. They were similarly unable to find my .bib file when it was named sources.bib. However, when I called it something else (I think references.bib), biber was able to find a completely different list of sources, which appears to be part of an example in the documentation.

This makes me think that biber/BibTeX/TexWorks doesn't know to look in the current directory before trying other places when looking for a file. Unfortunately, I have no idea how to fix that, or even how it happened in the first place.

I am running Windows 10. I also relatively recently uninstalled TexLive and switched to MikTex.

EDIT: My problem was Windows renaming my file with a .txt extension, then hiding it from me. Since extension hiding is the default behavior, I figure I should leave this question up as another thing to check with this problem.

6
  • 1
    Welcome! Can you compile successfully at the command line? Is your editor configured to put build files in a different directory?
    – cfr
    Commented Dec 10, 2015 at 2:50
  • I am able to produce a bibliography when running your code on my system (MacTeX2015 on MacOSX 10.11.2), with bibl.bib in the same directory as the "driver" tex file. However, there are two errors: the reference m99 is missing, and \citet[p.~199]{m85} generates a citeauthor slug as the plain bibliography style is not compatible with authoryear-style citation call-outs. (The second error can be fixed by switching to the plainnat bibliography style.)
    – Mico
    Commented Dec 10, 2015 at 6:15
  • 1
    Have you verified that the bib file (bibl.bib, right?) and the main tex file are indeed in the same directory?
    – Mico
    Commented Dec 10, 2015 at 8:15
  • 1
    Did you check if the bib-file has perhaps a hidden extension? Wenn you run on the command line dir *.bib is your bib in the list? Commented Dec 10, 2015 at 11:44
  • 1
    @UlrikeFischer That seems to have been the problem: Windows renamed the file to bibl.bib.txt (presumably after I opened it in Notepad) and wasn't telling me. At least this motivated me to turn off file extension hiding... Commented Dec 10, 2015 at 18:24

1 Answer 1

4

Windows 10 has extension hiding in filenames turned on by default, and as a result my .bib files had extensions like .bib.bib and .bib.txt, which was preventing biber from finding them.

I've resolved the issue (and turned off extension hiding).

You must log in to answer this question.

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