# Undefined citations error

When I try to cite references from my bibliography, they get a 'warning' of being undefined when I print the PDF the citations are there but only with the name of the bibitem and not the number.

\documentclass[12pt]{article}
\textheight 650pt
\textwidth 6in
\voffset -1cm
\hoffset -0.75cm

\input epsf
\def\figin{\epsfcheck\figin}\def\figins{\epsfcheck\figins}
\def\epsfcheck{\ifx\epsfbox\UnDeFiNeD
\message{(NO epsf.tex, FIGURES WILL BE IGNORED)}
\else\message{(FIGURES WILL BE INCLUDED)}%
\gdef\figin##1{##1}\gdef\figins##1{##1}\fi}

\def\figinsert{}
\def\ifig#1#2#3{\xdef#1{fig.~\the\figno}
\writedef{#1\leftbracket fig.\noexpand~\the\figno}%
\figinsert\figin{\centerline{#3}}\medskip\centerline{\vbox{\baselineskip12pt
\def\footnotefont{}\def\endinsert{}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[nottoc]{tocbibind}
\usepackage{csquotes}
\usepackage[backend=biber]{biblatex}
\usepackage{amsmath}
\usepackage{slashed}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}

Nambu and Jona-Lasinio's paper was motivated by an analogy between fermions and quasi-particle excitations in Superconductivity. The theory of
Superconductivity was written down by Bardeen, Cooper and Schrieffer (BCS) \cite{BCS} and then by Bogoliubov, \cite{Bogoliubov}.

\begin{thebibliography}{9}

\bibitem{BCS}
J. Bardeen, L. N. Cooper, and J. R. Schrieffer.
\textit{Theory of Superconductivity}.
Physical Review 106,162 (1957)

\bibitem{Bogoliubov}
N.N.Bogoliubov, V. V. Tolmachev and D. V. Shirkov.
\textit{A New Method in the Theory of Superconductivity}.
Aacademy of Sciences of U.S.S.R., Moscow, (1958)

\end{thebibliography}
\end{document}

• \input epsf in 2016? The graphics package was issued in 1994 and graphicx in 1995. – egreg Apr 20 '16 at 10:49
• What's the purpose of loading biblatex if you type in the bibliography by hand? – egreg Apr 20 '16 at 10:51
• May I ask you: Did you read an introduction to LaTeX? Checked you the documentation of biblatex? Do you know what every single line of your code does? If not, delete them. Please use only commands you understand. And please do not just copy old code from the internet. Check if there are better, newer possibilities ... That is not ment to be rude, I just want to save your and or time ... – Kurt Apr 20 '16 at 10:54

You seem to be mixing two things: to create a bibliography in LaTeX, you can either

1. Create the bibliography yourself
2. Let BibTeX or BibLaTeX create bibliography (see here)

You kind of do both... With \usepackage[backend=biber]{biblatex}, you tell LaTeX that you want to use BibLaTeX with Biber as a backend. But then, you create the bibliography yourself, with \begin{thebibliography} ... \end{thebibliography}.

The solution is to decide for either of those:

1. Manually creating the bibliography: You've actually already created the bibliography. All you have to do is remove the line

\usepackage[backend=biber]{biblatex}


and compile the file twice, e.g. with pdflatex.

2. Let BibLaTeX do the work: This has the advantage that you don't need to care (much) about the formatting and the sorting of the bibliography.

a) Create a BibTeX file, called e.g. mybibliography.bib, which contains all your references. You can often download the BibTeX entry of an article directly from where you get the article (e.g. IEEEXplore, Google Scholar, etc.). In your case, this file looks as follows:

@article{BCS,
title={Theory of superconductivity},
author={Bardeen, John and Cooper, Leon N and Schrieffer, J Robert},
journal={Physical Review},
volume={108},
number={5},
pages={1175},
year={1957},
publisher={APS}
}

@article{Bogoliubov,
title={A new method in the theory of superconductivity},
author={Bogoliubov, Nikolai Nikolaevich and Tolmachev, VV and Shirkov, DV},
journal={Consultants Bureau, New York},
year={1960}
}


I copy&pasted these entries from Google Scholar, so no guarantee for their correctness. I recommend to always check these entries, and maybe add fields you need (see here for many details on possible entries, ...)

b) Add this BibTeX file just below the \usepackage... with

\bibliography{mybibliography.bib}


c) Replace the whole \begin{thebibliography} ... \end{thebibliography} by \printbibliography.

d) Compile the document with pdflatex yourDocument.tex, then create the bibliography by calling biber yourDocument, finally compile another two times with pdflatex yourDocument.tex.

Et voilà, with either of these two ways, it will work. Even though 2. looks like more work now, it is often worth it, as adding papers is as simple as copy&paste, and you don't need to care about formatting. You can select from various standard citation styles, and can easily switch between those without having to rewrite the whole bibliography.

A closing remark, as suggested in comments to this question, you seem to be using quite some old packages. A hint: remove everything you don't know. E.g. start with

\documentclass{article}
\usepackage[utf8]{inputenc}         % Needed for UTF-8 support
\usepackage[english]{babel}         % English hyphenation etc.
\begin{document}
Hello World!
\end{document}


and add packages, as you need them. E.g. now you add the BibLaTeX stuff. When you need to add images, include graphicx (or any package you specifically need). If you start doing math, include amsmath. That way you don't have thousands of packages and old stuff, you don't really need.

• okay im just struggling with step d) I don't know how to compile the documents – Sam Grill Apr 20 '16 at 11:19
• im working in texmaker – Sam Grill Apr 20 '16 at 11:22
• Texmaker has a "Tools" menu, right? Is there a submenu, where you have entries like "pdflatex", or "biber"? Clicking those should start the corresponding commands. – hbaderts Apr 20 '16 at 11:39
• there is pdflatex but not biber, there is bibtex? – Sam Grill Apr 20 '16 at 11:43
• Do you use MikTex or TexLive? Does this answer help? – hbaderts Apr 20 '16 at 12:03