# Bibliography not printed at the end of the book

I'm having a problem with printing the bibliography at end of a book. The main .tex file is

\documentclass[a4paper,12pt]{book}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{url}
\usepackage[algoruled,vlined]{algorithm2e}
\usepackage{graphicx,subfigure}
\usepackage{booktabs}
\usepackage[usenames,dvipsnames]{color}

\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{0.1pt} % for lower line
\fancyfoot[C]{\thepage}

\usepackage[semicolon]{natbib}

\usepackage{fancybox}

\usepackage{xcolor}
\usepackage{framed}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

\newenvironment{myfancybox}{%
\def\FrameCommand{\fboxsep=\FrameSep \fcolorbox{black}}%
\color{black}\MakeFramed {\FrameRestore}}%
{\endMakeFramed}

\usepackage{rotating}

\usepackage{sectsty}
\allsectionsfont{\itshape}

\parskip1ex
\begin{document}

\include{forTest}
\bibliographystyle{plainnat}
\bibliography{refs}
\end{document}


In a document forTest.tex put

\chapter{abs}
\label{ch:grid}

\section{asdf }


and the content of the refs.bib file that is in the same folder as the other files:

@inproceedings{ads,
booktitle = "sdaf",
pages = "19",
publisher = "sda",
year = 2008
}


After I hit pdflatex, citation adf is undefined. Note that the bib file is very large, and I should not adapt that file. I wonder if there is some other way to include it.

-
have you run bibtex? you need pdflatex bibtex pdflatex to sort out all the references –  David Carlisle Jun 11 '12 at 14:48
Many thanks. Note that by pdflatex only I managed to do some shorter documents, but that's different story, I guess. –  boy Jun 11 '12 at 14:55

If using bibtex you need to run (pdf)latex once (to write the list of needed citations to the aux file) then you need to run bibtex (to generate the bbl file that contains the LaTeX code for the bibliography) Then you need to run (pdf)latex twice more to resolve all the cross references to the generated bibliography.