# How to get references at the end of each chapter?

I want to get references at the end of each chapter. references are in bib files. Please help me. I also want to write the title of each chapter.

    \documentclass[twoside]{book}
\usepackage[paperwidth=7.25in, paperheight=9.5in,bindingoffset=.75in]{geometry}
\usepackage{fancyhdr,graphicx,lipsum,multibib}
\usepackage{natbib}
\usepackage{chapterbib}
\usepackage{abstract}
\renewenvironment{abstract}[1]
{\begin{quote}
\noindent \rule{\linewidth}{.5pt}\par{\bfseries Abstract.} #1}
{\medskip\noindent \rule{\linewidth}{.5pt}
\end{quote}
}
\pagestyle{fancy}
\begin{document}
\include{ch1}
\include{ch2}
\end{document}


Ch1 file

         \begin{abstract}
Each chapter should be preceded   \cite{celik2009allee} ....
\end{abstract}
\bibliography{bibtex_1}
\bibliographystyle{plain}


ch2 file

        \begin{abstract}
Each chapter should be preceded  \cite{guin2014spatial} ....
\end{abstract}
\bibliography{bibtex_2}
\bibliographystyle{plain}


bibtex_1

@article{celik2009allee,
title={Allee effect in a discrete-time predator--prey system},
author={Celik, Canan and Duman, Oktay},
journal={Chaos, Solitons \& Fractals},
volume={40},
number={4},
pages={1956--1962},
year={2009},
publisher={Elsevier}
}
@article{gao2013dynamics,
title={DYNAMICS OF A RATIO-DEPENDENT PREDATOR-PREY SYSTEM WITH A STRONG ALLEE EFFECT.},
author={Gao, Yujing and Li, Bingtuan},
journal={Discrete \& Continuous Dynamical Systems-Series B},
volume={18},
number={9},
year={2013}
}


bibtex_2 file

@article{guin2014spatial,
title={Spatiotemporal dynamics of reaction--diffusion models of interacting populations},
author={Guin, L N and Mandal, P K},
journal={Applied Mathematical Modelling},
year={http://dx.doi.org/10.1016/j.apm.2014.02.022},
publisher={Elsevier}
}
@article{freedman1979stability,
title={Stability analysis of a predator-prey system with mutual interference and density-dependent death rates},
author={Freedman, HI},
journal={Bulletin of Mathematical Biology},
volume={41},
number={1},
pages={67--78},
year={1979},
publisher={Springer}
}

• – cfr Dec 26 '14 at 20:47
• cfr I tried, read chapterbib.pdf but failed to solve the issue. please guide me. – user1942348 Dec 26 '14 at 20:55
• Did you run bibtex on each bibliography file produced during initial compilation? Unlike biblatex, bibtex won't handle this automatically. – cfr Dec 26 '14 at 20:58
• cfr yes I have. – user1942348 Dec 26 '14 at 21:00
• The problem is that the references are not coming in case of two or more bib files. I want to solve the issue. – user1942348 Dec 26 '14 at 21:03

• I removed packages not relevant to the problem.

Problems relevant to the question:

• http://dx.doi.org/10.1016/j.apm.2014.02.022 is not a year and you cannot persuade bibtex to accept it as one. I made this a url field.
• multibib appears to hang compilation, probably because it does not entirely agree with chapterbib though I did not investigate. Instead, I removed it.
• plain is not compatible with author-year citations which causes natbib to complain. However, if you continue compilation, it is fine - it just uses numerical labels instead. You should consider using plainnat instead, which is natbib's and will still get you numerical citations, without complaints.

Then it works fine. At least, the use of rules is weird but that's an issue with your definition of abstract and not anything to do with bibliographies.

# Code

\begin{filecontents}{ch1.tex}
\begin{abstract}
Each chapter should be preceded   \cite{celik2009allee} ....
\end{abstract}
\bibliography{bib1}
\bibliographystyle{plain}
\end{filecontents}
\begin{filecontents}{ch2.tex}
\begin{abstract}
Each chapter should be preceded  \cite{guin2014spatial} ....
\end{abstract}
\bibliography{bib2}
\bibliographystyle{plain}
\end{filecontents}
\begin{filecontents}{bib1.bib}
@article{celik2009allee,
title={Allee effect in a discrete-time predator--prey system},
author={Celik, Canan and Duman, Oktay},
journal={Chaos, Solitons \& Fractals},
volume={40},
number={4},
pages={1956--1962},
year={2009},
publisher={Elsevier}
}
@article{gao2013dynamics,
title={DYNAMICS OF A RATIO-DEPENDENT PREDATOR-PREY SYSTEM WITH A STRONG ALLEE EFFECT.},
author={Gao, Yujing and Li, Bingtuan},
journal={Discrete \& Continuous Dynamical Systems-Series B},
volume={18},
number={9},
year={2013}
}
\end{filecontents}
\begin{filecontents}{bib2.bib}
@article{guin2014spatial,
title={Spatiotemporal dynamics of reaction--diffusion models of interacting populations},
author={Guin, L N and Mandal, P K},
journal={Applied Mathematical Modelling},
url={http://dx.doi.org/10.1016/j.apm.2014.02.022},
publisher={Elsevier}
}
@article{freedman1979stability,
title={Stability analysis of a predator-prey system with mutual interference and density-dependent death rates},
author={Freedman, HI},
journal={Bulletin of Mathematical Biology},
volume={41},
number={1},
pages={67--78},
year={1979},
publisher={Springer}
}
\end{filecontents}
\documentclass{book}
\usepackage{natbib}
\usepackage{chapterbib}
\newenvironment{abstract}[1]
{\begin{quote}
\noindent \rule{\linewidth}{.5pt}\par{\bfseries Abstract.} #1}
{\medskip\noindent \rule{\linewidth}{.5pt}
\end{quote}
}
\begin{document}
\include{ch1}
\include{ch2}
\end{document}

• Would you mean this \documentclass[twoside]{book} \usepackage[paperwidth=7.25in, paperheight=9.5in,bindingoffset=.75in]{geometry} \usepackage{fancyhdr,graphicx} \usepackage{natbib} \usepackage{chapterbib} \pagestyle{fancy} \fancyhead[LO]{\includegraphics[width=1.5cm,height=1.5cm,keepaspectratio]{example-image-a}} \fancyhead[RE]{\includegraphics[width=1.5cm,height=1.5cm,keepaspectratio]{example-image-b}} \setlength{\headheight}{47.0pt} \begin{document} \include{ch1} \include{ch2} \end{document} – user1942348 Dec 26 '14 at 21:41
• @user1942348 I've posted the code which I used. Except you should use plainnat rather than plain. – cfr Dec 26 '14 at 22:00
• @user1942348 When you run exactly the code I posted, what happens? Put the code in a new, blank document and run pdflatex -> pdflatex. Don't add or subtract anything. We need a sanity check and that means we want to know if the reference displays OK when you run exactly the same code I run. EDIT; also, work in an otherwise empty directory. (Empty folder if you are on Windows.) – cfr Dec 27 '14 at 23:02
• @user1942348 Not the problem but you should adjust page dimensions manually if you're using geometry as it won't know about the changes. Pass headheight=47pt as another option to geometry instead. – cfr Dec 27 '14 at 23:04
• I have followed the code and steps you have suggested. But the reference places are still coming as ?. – user1942348 Dec 28 '14 at 9:23