# How to resolve “Citation '1' on the page 1 undefined”

I spent past couple of hours to get citation working on my latex. I am using TexMaker and I tried to compile the document in latex->bibtex -> latex -> latex -> PdfLatex order. However, I only see ? on my outcome pdf file. Could you help me? Thanks !

\documentclass{article}
\usepackage{natbib}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{1,
author = {Mustermann, A. and Mostermann, B. and Mistermann, C},
year = {2011},
title = {Using articles in {\LaTeX} documents},
journal = {Journal}
}
\end{filecontents}

\begin{document}

\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}

• I can't reproduce the problem. When I compile using your sequence I see all the references as well as their \cites in the text. – Werner Feb 24 '15 at 3:40
• Are you maybe missing a \bibliographystyle directive in your real document? – Mico Feb 24 '15 at 3:57
• Not sure, if the key may just ve a number or requires a/some characeters in front. This may be compiler dependent. – engineer Feb 24 '15 at 7:14

pdflatex -synctex=1 -interaction=nonstopmode %.tex