# Citing does not work [duplicate]

As posted in my other question, I am publishing a book and these 2 errors are the only errors remaining after weeks of struggling in solving problems.

The following image: is produced by the following code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\title{testest}
\author{dennis93muller }
\date{August 2016}
\begin{document}
\maketitle
programs as defined by \citet{DeMaio2009Bike-sharing:Future}.
\bibliographystyle{plain}
\bibliography{Mendeley.bib}
\section{Introduction}
\end{document}


The bib.file contains the following:

@article{DeMaio2009Bike-sharing:Future,
title = {{Bike-sharing: History, impacts, models of provision, and future}},
year = {2009},
journal = {Journal of Public Transportation},
author = {DeMaio, Paul},
number = {4},
pages = {3},
volume = {12},
isbn = {1077-291X}
}


The output should be: programs as defined by DeMaio. However this is not the case. Does anyone have any idea why this is happening? I have also tried \cite or \citep, neither have the right ouput!

## marked as duplicate by David Carlisle, Stefan Pinnow, Werner, Stefan Kottwitz♦Aug 18 '16 at 16:57

• +1 for struggling with all the other problems. Maybe you could have saved some time by asking here when stuck. – Ethan Bolker Aug 18 '16 at 13:54
• if you make a document with just that citation (and minimum number of packages to define \citet etc) referencing your bib file, does it work? if not post it here, if it does, add packages from your main document until it breaks.... – David Carlisle Aug 18 '16 at 14:40
• It does not work. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{natbib} \title{testest} \author{dennis93muller } \date{August 2016} \begin{document} \maketitle programs as defined by \citet{DeMaio2009Bike-sharing:Future}. \section{Introduction} \end{document} provides the same output with the following error: You have cited something which is not included in your bibliography. Make sure that the citation (\cite{...}) has a corresponding key in your bibliography, and that both are spelled the same way. – Soldexio Aug 18 '16 at 15:18
• @DavidCarlisle I suggest to mark this thread as a duplicate of Why do I get (author?) when I use \citet with natbib?, but don't know how to do it ... – gernot Aug 18 '16 at 16:19
• @gernot there should be a close link just below the question, select that then select duplicate. (it normally takes 5 votes but if you do it the "community" bot will probably step in and close the question) – David Carlisle Aug 18 '16 at 16:22

You are missing the \bibliographystyle and \bibliography command in your minimal example.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\title{testest}
\author{dennis93muller}
\date{August 2016}
\begin{document}
\maketitle
programs as defined by \citet{DeMaio2009Bike-sharing:Future}.

\section{Introduction}

\bibliographystyle{plainnat}
\bibliography{test}

\end{document}


You get the output from your graphic when you use a natbib incompatible bibliographystyle like e.g. plain. Change it to plainnat.

• Truely that is a life saver, thank you so much! – Soldexio Aug 18 '16 at 16:13