I am submitting my PhD thesis and our department requires a separate bibliography for each chapter that contains an article, I have got 4 chapters, the first chapter is a literature review (not an article) which means I do not need to generate a bibliography for it. The university's template of the root file is as follows:
\documentclass[PhD,bibsection,english]{ulthese}
\ifxetex\else \usepackage[utf8]{inputenc} \fi
\titre{<Titre principal>}
\auteur{<Prénom Nom>}
\direction{<Prénom Nom>, <directeur ou directrice> de recherche}
\begin{document}
\frontmatter
\frontispice
\include{resume}
\include{abstract}
\cleardoublepage
\tableofcontents
\cleardoublepage
\listoftables
\cleardoublepage
\listoffigures
\cleardoublepage
\dedicace{<Dédicace si désiré>}
\cleardoublepage
\epigraphe{<Texte de l'épigraphe>}{<Source ou auteur>}
\cleardoublepage
\include{remerciements}
\include{avantpropos}
\mainmatter
\include{introduction}
\include{chapitre1-articles}
\include{chapitre2-articles}
\include{conclusion}
\appendix
\include{annexe}
\end{document}
and they suggest having the following in each article chapter:
\bibliographystyle{plainnat}
\bibliography{references}
However, if I only use their code, I cannot generate the references of my first chapter (literature review), and I cannot generate the overall bibliography at the end of the document. If I add \bibliographystyle{plainnat} and \bibliography{references} to the root file as follows:
\documentclass[PhD,bibsection,english]{ulthese}
\ifxetex\else \usepackage[utf8]{inputenc} \fi
\bibliographystyle{plainnat}
\titre{<Titre principal>}
\auteur{<Prénom Nom>}
\direction{<Prénom Nom>, <directeur ou directrice> de recherche}
\begin{document}
\frontmatter
\frontispice
\include{resume}
\include{abstract}
\cleardoublepage
\tableofcontents
\cleardoublepage
\listoftables
\cleardoublepage
\listoffigures
\cleardoublepage
\dedicace{<Dédicace si désiré>}
\cleardoublepage
\epigraphe{<Texte de l'épigraphe>}{<Source ou auteur>}
\cleardoublepage
\include{remerciements}
\include{avantpropos}
\mainmatter
\include{introduction}
\include{chapitre1-articles}
\include{chapitre2-articles}
\include{conclusion}
\appendix
\include{annexe}
\bibliography{references}
\end{document}
Then I try to do Bibtex, it shows the following error:
Illegal, another \bibstyle command---line 208 of file Chapter1.aux
: \bibstyle
: {plainnat}
I'm skipping whatever remains of this command
Illegal, another \bibdata command---line 56 of file PhD_thesis_aziez_111187664.aux
: \bibdata
: {references}
I'm skipping whatever remains of this command
Database file #1: references.bib
(There were 2 error messages)
In addition, the references in my first chapter (literature review) are all question marks "?", and the overall bibliography appears as a subsection of the conclusion as follows:

I tried some solutions including: chapterbib and bibunits but without any success. I hope that you can help me.
ultheseuseschapterbib, when usingchapterbibwith an overall bibliography theIllegal, another \bibstyle commanderror is expected (see "7 Overall bibliography" of thechapterbibdocumenation) and shouldn't cause errors. Could you confirm exactly whatbibtexcalls you are making? Are you able to construct a minimal working example with bibliography (MWEB)? There's probably something causing an issue in chapter 1 (doesbibtex chap1give any errors?) – Dai Bowen May 05 '23 at 14:53\sectionbib{\chapter*}{chapter}just before the final\bibliography– Dai Bowen May 05 '23 at 14:53