# How to put Bibliography at the end of each section in my thesis?

I use following to have reference at the end of each section. After compiling my latex file any thing does not appear. How to solve this problem??

\section{Target}
\begin{bibunit}
My Text with a lot of citations, \cite{a}
\cite{b}
\putbib[PhD_thesis] %PhD_thesis.bib is my bib file
\end{bibunit}

• Your question will be clearer and attract quicker and better answers if you provide a minimal example (or see here). – jon Jan 18 '15 at 19:57
• You mention running LaTeX twice. Did you run BibTeX as well, by running the command bibtex bu1? After running this command, remember to run LaTeX twice more to fully propagate all changes. – Mico Jan 18 '15 at 20:04
• To achieve this is pretty easy with package biblatex. – Johannes_B Jan 18 '15 at 20:09
• You need to run bibtex for each section of the document - as Mico says, bibtex bu1 for the first section - bibtex bu2 for the second etc. biblatex/biber can handle this automatically, but bibtex can't. Generally, if you run bibtex in your editor, it will run bibtex using for the main document only, which is not going to cut it if you have separate bibs for each section. – cfr Jan 18 '15 at 20:51
• Just as @Mico said e.g. bibtex bu1 for the first section. Then bibtex bu2 for the second and so on for each section which has its own bibliography. – cfr Jan 19 '15 at 12:47

Here's a recommendation:

• First, run LaTeX on your tex file. If the tex file is called, say, main.tex, you need to run

pdflatex main


(or xelatex main or lualatex main, as appropriate). You can do this either from a command line or from within your tex-aware editor.

Given that the bibunits package has been loaded, files called bu1.aux, bu2.aux, etc will be created by LaTeX -- one file per bibunit environment in the tex file. Note that this will happen irrespective of whether your bibtex inputs are in a single .bib file or are contained in multiple .bib files.

• Second, open a command window and run BibTeX on each of the bu<x> files:

bibtex bu1
bibtex bu2


etc. Do not run BibTeX on the main tex file, i.e., do not run bibtex main.

BibTeX will create files called bu1.bbl, bu2.bbl, etc. as well as associated log files (with extension blg). Pay attention to any error and/or warning messages you may get at the BibTeX stage. They may alert you to syntax errors in the bib entries or the \cite commands in main.tex. Resolve them and re-run LaTeX and BibTeX as outlined above.

• Finally, run pdflatex main twice more to incorporate the material in the bbl files, in the form of (a) formatted (and grouped) references and (b) citation call-outs.

I found a blog which describes a solution based on BIBER.

https://texblog.org/2012/10/22/multiple-bibliographies-with-biblatex/

Here a copy of the sources:

\documentclass{article}
\usepackage[sorting=none, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{knuth1986texbook,
keywords = {book},
title={The texbook},
author={Knuth, D.E. and Bibby, D.},
volume={1993},
year={1986},
}
@article{knuth1977fast,
keywords = {article},
title={Fast pattern matching in strings},
author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
journal={SIAM journal on computing},
volume={6},
number={2},
pages={323--350},
year={1977},
publisher={SIAM}
}
\end{filecontents}