I'm trying to use natbib to get a bibliography, but it's not working. I tried compiling a sample tex-file, which worked fine, but in my document it's not happening. My document looks like this:
\listfiles
\documentclass[12pt]{ociamthesis}
\usepackage[square]{natbib}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabulary}
\usepackage{listings}
\usepackage{color}
\usepackage{eurosym}
\usepackage[]{graphicx}
\usepackage{subfigure}
\usepackage{textcomp}
\begin{document}
---content with citations---
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}
My bib-file looks like this:
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
It just completely ignores the bibliography, there's no headline or anything. Where I put the citations, it prints ?. I even tried stripping the document until only
\documentclass[12pt]{ociamthesis}
\usepackage{natbib}
\begin{document}
\cite{goossens93}
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}
remained, but it didn't help. When I created a new .tex-file in another directory with the same contents, it worked fine. Deleting everything but the *.tex-file also didn't help. Does anyone have an idea what I'm doing wrong?
\documentclass{article}and I did not encounter any problems. – Christian Jul 05 '16 at 07:25subfigurepackage is badly deprecated -- don't use it. In its stead, consider using either thesubfigpackage or thesubcaptionpackage. – Mico Aug 05 '16 at 07:33