# References not getting the correct page number

I am a beginner in using LaTeX. The problem I am getting is that I am unable to get the correct reference page number in the content, but get the previous chapter last page number. Also in the header, i.e. chapter number of the references is of previous chapter.

This is the main file code

\documentclass[12pt,a4paper]{report}

\usepackage[top=0.70in, bottom=0.70in, left=0.8in,right=0.80in]{geometry} % setting the page alignment with this package
\usepackage[pdftex]{graphicx}
\usepackage[final]{pdfpages} %for embedding another pdf, remove if not required
\usepackage{float} %used for figure placement with H as a parameter
\usepackage{pslatex} % for times new roman, old package, but works
\usepackage{array} % for making text bold in table
\usepackage{subfigure} % for displaying figure side by side

\usepackage{fancyhdr}
\fancypagestyle{plain}{%
%\fancyhf{} % clear all header and footer fields
\fancyfoot[L]{\emph{TouchX Mouse Simulation Using Gesture on a Virtual Screen}} % except the center
\fancyfoot[R]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}
}

\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}

\fancyfoot[LO,LE]{\emph{TouchX Mouse Simulation Using Gesture on a Virtual Screen}}
\cfoot{}
\fancyfoot[RO, RE]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}
%For the header and footer Over

% Altering the Index Page Title
%\renewcommand{\contentsname}{\begin{center}\textsc{University Of Pune \\2011 - 2012}\\[1cm]Index\end{center}}

%GLOBAL SETTINGS OVER, DOCUMENT BEGINS
\begin{document}

%Renames "Bibliography" to "References" on ref page
\renewcommand\bibname{References}

%ADD FIGURE OF TABLES IF YOU NEED TO, CHECK DOCUMENTATION

%To reset the Header & Footer for TOC and LOF
\pagestyle{empty}

%\pagestyle{empty}

\listoffigures % adds List of Figures
\listoftables
\cleardoublepage

%And reset back the settings we choose for Header and Footer
\pagestyle{fancy}

\newpage

\input{project/introduction.tex} % adds the introduction page
\input{project/ref.tex} % adds the References page

\end{document}


and the ref.tex file is

\addcontentsline{toc}{chapter}{References}
\begin{thebibliography}{99}

\bibitem{short_paper_name}Mario Ganzeboom ,\emph{How hand gestures are recognized using a dataglove};  University of Twente,The Netherlands,2010.
\bibitem{short_paper_name}Ye Zhou,Gerald Morrison,\emph{A Real-time Algorithm for Finger Detection in a Camera Based Finger-Friendly Interactive Board System}; 5th International Conference on Computer Vision Systems, Applied Computer Science Group, Bielefeld University, Germany,2007.

\end{thebibliography}

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem directly to the question, i.e. remove every line which does not have an impact on the issue (like unrelated packages, etc.) and inline the content from input files. –  Martin Scharrer May 1 '12 at 7:52
One thing I found in your code is that you are passing device drivers to the packages, i.e. pdftex to graphicx and dvips to hyperref. This is no longer required and should be avoided, because it leads to issues when the wrong driver is selected manually. Of course, the driver should be the same for all packages, so the above choice doesn't make much sense. This is not related to your stated problem, but will cause issues for you nevertheless. –  Martin Scharrer May 1 '12 at 7:55
Note that the 'References' page uses \chapter* (with report class) and therefore doesn't change the chapter counter, which explains why you still get the last chapter number. Usually you don't have an header showing the chapter number or title for such pages, so I would recommend you to switch the page style for these pages. If you give a full example of your use case, we can help you better. –  Martin Scharrer May 1 '12 at 7:57
Your example is not very minimal... –  Martin Schröder May 1 '12 at 8:55

It's quite simple:

\begin{thebibliography}{99}

\bibitem{short_paper_name1}
Mario Ganzeboom, \emph{How hand gestures are recognized using a dataglove};  University of Twente, The Netherlands,2010.

\bibitem{short_paper_name2}
Ye Zhou,Gerald Morrison, \emph{A Real-time Algorithm for Finger Detection in a Camera Based Finger-Friendly Interactive Board System}; 5th International Conference on Computer Vision Systems, Applied Computer Science Group, Bielefeld University, Germany, 2007.

\end{thebibliography}


In this way the header is set after the bibliography has started and so the page number in the table of contents will be correct.

## Some notes

You're using conflicting options dvips and pdftex: remove them, they are unnecessary as the typesetting engine is able to recognize itself.

The package pslatex is obsolete:

\usepackage{mathptmx}


Also subfigure is obsolete:

\usepackage{subfig}


(you may need to change some commands, as the new version uses \subfloat rather than \subfigure and \subtable).

\setlength{\headheight}{14.5pt}

to the preamble, or headheight=14.5pt to the options passed to geometry.