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.
bibl.bib
in the same directory as the "driver" tex file. However, there are two errors: the referencem99
is missing, and\citet[p.~199]{m85}
generates a citeauthor slug as theplain
bibliography style is not compatible with authoryear-style citation call-outs. (The second error can be fixed by switching to theplainnat
bibliography style.)bibl.bib
, right?) and the main tex file are indeed in the same directory?dir *.bib
is your bib in the list?