# natbib not printing bibliography [duplicate]

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",
}


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?

## marked as duplicate by user36296, Stefan Pinnow, Jesse, Mensch, moeweAug 26 '16 at 12:04

• Are you using BibTeX? – Christian Jul 5 '16 at 6:18
• I do not have your classfile, so I tried your MWE with \documentclass{article} and I did not encounter any problems. – Christian Jul 5 '16 at 7:25
• Show the log-file and the blg-file of the compilation of the stripped down failing example. – Ulrike Fischer Jul 5 '16 at 7:33
• Off-topic: The subfigure package is badly deprecated -- don't use it. In its stead, consider using either the subfig package or the subcaption package. – Mico Aug 5 '16 at 7:33

Simply loading the natbib citation management package does not generate a formatted bibliography. The natbib package provides various citation-related commands and provides several bibliography styles, such as plainnat.