What package should I load to use refsegment?

I am using this thesis template: https://github.com/kks32/phd-thesis-template/

I want to print a reference list for each chapter. When I insert the following command I get a lot of errors.

The command I want:

\printbibliography[segment=\therefsegment,title=first bib]


attempts: 1) I tried pasting this command at the end of the chapter 2) I tried pasting it after the "include\chapter" command in the main file

nothing worked

the errors I get: for bibtex:

This is BibTeX, Version 0.99d (TeX Live 2015) The top-level auxiliary file: thesis.aux I found no \citation commands---while reading file thesis.aux I found no \bibdata command---while reading file thesis.aux I found no \bibstyle command---while reading file thesis.aux (There were 3 error messages)

for latex: I get "Undefined control sequence"

I am not inserting anything related to bibliography in the preamble, I thought this could be the problem?

I am using this in the main file:

\bibliographystyle{IEEEtran}
%\bibliographystyle{unsrt} % Use for unsorted references
%\bibliographystyle{plainnat} % use this to have URLs listed in References
\cleardoublepage
\bibliography{References/references} % Path to your References.bib file

• The upper part is completely incompatible with the lower part of your question. For the upper, you need package biblatex. – Johannes_B Mar 13 '16 at 11:05
• A thesis template leads to confusion. shocked – Johannes_B Mar 13 '16 at 11:06
• @Johannes_B How do I make them compatible? I need to use the IEEE style and I need to print the references for each chapter. I just tried to use '\usepackage{biblatex}' and '\usepackage[backend=biber]{biblatex}' in the preamble and I still can't get the document to compile. Insight appreciated. – HappyBee Mar 13 '16 at 11:16
• First you have to decide between using biblatex and an IEEE compatible style, or using the older BibTeX/natbib system along with a package for split bibliographies. – Johannes_B Mar 13 '16 at 11:47
• There must be a solution to use IEEE and print the reference list for each chapter. Are you sure there isn't? @Johannes_B – HappyBee Mar 13 '16 at 15:01

From the LaTeX wikibook but using IEEE.

\documentclass{article}
\usepackage[backend=biber,style=ieee,refsection=section]{biblatex}
\begin{document}
\section{Aster}
\cite{ctan,sigfridsson} and some text

You need to run biber as defined by the backend.
• It does not work. Do you know why? I added \usepackage[backend=biber,style=ieee,refsection=section]{biblatex} and \addbibresource{References/references.bib} to my preamble file. and \printbibliography[heading=subbibliography] to my chapter file. I did not add anything to the main file. I tried also to remove the \addbibresource{References/references.bib} from the preamble file to the main file, still no luck. @Johannes_B – HappyBee Mar 14 '16 at 15:41