# Citations not showing up in text and bibiography

I have a References.bib file that contains all references I will cite. My Paper.tex looks like this:

\documentclass{article}
\usepackage{makeidx}  % allows for indexgeneration
\usepackage{ifpdf}
\usepackage{url}
\usepackage{graphicx}

\begin{figure}[h]
\centering
\includegraphics[scale=.89,bb=0 0 291 279]{f1.png}
\label{picture-label}
\end{figure}
TEXT \cite{1}

\bibliographystyle{plain}
\bibliography{References.bib}
\end{document}

But I did not get the References at the end of the PDF file, and also I did not get the citation after the text. instead I get [?]. How can I make my references show up in the text?

-

## migrated from stackoverflow.comFeb 3 '12 at 20:22

This question came from our site for professional and enthusiast programmers.

The following answer might be of help: Unable to generate references using .bib in Texlipse. Even though it references Texlipse, it is probably independent and therefore should solve your problem. Please let us know. –  Werner Feb 3 '12 at 20:27
How often did you compile your LaTeX file? Did you run BibTeX? It is not enough in this case to compile just once. –  Count Zero Feb 3 '12 at 20:28
This may not be the reason but anyway, you should remove the extension from your reference file, i.e. \biliography{References} –  vaettchen Feb 4 '12 at 7:40
The only citation you have seems to have a bibkey of 1. Is that really the bibkey? –  StrongBad Feb 4 '12 at 9:52

First of all, you have to remove the extension .bib from your \bibliography command; i.e. \bibliography{References} and make sure it is in the same folder as your compiles .tex file, if it is in a sub-directory then use \bibliography{./References/References} as an example.

You also have to make sure the entry is correct in your bibliography .bib file, I can see you use cite{1}, so I presume you have an entry in your .bib file as:

@book{1,
title={Book},
author={Author}
}

... of course you have to fill in all obligatory fields depending on entry type. BibTeX Documentation.

For your compilation to work properly, you should compile in the following manner:

pdflatex file.tex && bibtex file.aux && pdflatex file.tex && pdflatex file.tex

This example being given for a pdflatex output, you could use latex ,xetex or whichever engine you use.

If you get a [?] in your citation instead of a proper reference number, check the log file for something like:

LaTeX Warning: Citation 1' on page 2 undefined on input line 51
-
Thanks Ayman , It works now , but still not all citation appear properly.Some of them are still [?] –  M.A Feb 5 '12 at 18:25
@Mohammed It's probably a typo in either the \cite command or the BibTeX entry; you could have a @book{Mohammed, entry and a \cite{Mohammd}, it's common. If the problem persists, provide an MWE for your .tex file and .bib file. –  Ayman Elmasry Feb 5 '12 at 20:18
I am using TexMakerX , the problem is resolved now I have to choose the citation EXPLICITLY form the pop-up menu after typing \cite –  M.A Feb 6 '12 at 2:19

I had the same problem and just resolved it. Maybe you have the same mistake as mine. My .bib file was named 'ref.bib' and I was thinking: its name is 'ref' and its postfix is 'bib'. However, the 'name.postfix' was 'ref.bib.tex'. It was so because based on my PC settings, the postfix of files are not shown. So I just changed it to 'ref.bib' and resolved the problem.

You can check the postfix of your file in 'type' column of the folder your files are located if you change the view to "details".

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Martin Schröder Mar 6 '14 at 7:30