0

I am working on my thesis which is divided into chapters and I want to have a bibliography for each chapter. I am using a numeric style. For now I am just using the generic unsrt bibliography style. The issue is that when I want to insert an Authors name (ie "bob lawblaw et al (1)") using \citet i get (name?)(1). I did not have this issue prior to switching to chapterbib

Here is a working example borrowed from elsewhere:

 \documentclass[12pt, twoside]{book}
 \usepackage[utf8]{inputenc}
 \usepackage[english]{babel}
 \usepackage{graphicx}
 \usepackage[pagestyles]{titlesec}
 \titleformat{\chapter}[display]{\normalfont\bfseries}{}{0pt}{\Huge}
 %\newpagestyle{mystyle}
%{\sethead[\thepage][][\chaptertitle]{}{}{\thepage}}
%\pagestyle{mystyle}\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Don't use this                                               %
%\usepackage[semicolon,round,sort&compress,sectionbib]{natbib} %
%\usepackage[sectionbib]{chapterbib}                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Replacement                                                  %
\usepackage[number,sectionbib]{natbib}  %
\usepackage{chapterbib}                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]            
{geometry} % this was incomplete
\usepackage{filecontents}
% Create bib file for Introduction chapter
\begin{filecontents*}{bib0.bib}
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical         investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@book{acemoglu2012,
title={Why nations fail: the origins of power, prosperity and poverty},
author={Acemoglu, Daron and Robinson, James A and Woren, Dan},
volume={4},
year={2012},
publisher={SciELO Chile}
}
\end{filecontents*}
%
% Create bib file for chapter 1. Note that it is not a requirement to have     different bib files for each chapter.
\begin{filecontents*}{bib1.bib}
@article{acemoglu2000,
title={The colonial origins of comparative development: An empirical investigation},
author={Acemoglu, Daron and Johnson, Simon and Robinson, James A},
year={2000},
institution={National bureau of economic research}
}
@article{ackerberg2006,
    title={Structural identification of production functions},
author={Ackerberg, Daniel and Caves, Kevin and Frazer, Garth},
year={2006}
}
%
%Create Introduction
\end{filecontents*}
\begin{filecontents*}{chap0.tex}
\chapter{Introduction}
This is Chapter ``Introduction'' from included file chap0.tex. \\
This is a citation for \cite{acemoglu2000} from bib0. \\
\citep{acemoglu2012} is a citation for the second reference. \\
The Reference list for introductory chapter appears next. \\
\bibliographystyle{unsrt}
\bibliography{bib0}
\end{filecontents*}
%
% Create Chapter 1
\begin{filecontents*}{chap1.tex}
\chapter{chap1}
This is Chapter 1 from included file chap1.tex. \\
This is a citation for \cite{acemoglu2000} from bib1. \\
\citet{ackerberg2006} is a citation for the second reference. \\
The Reference list for the chapter appears next. \\
\bibliographystyle{unsrt}
\bibliography{bib1}
\end{filecontents*}
\begin{document}

\include{chap0}
\include{chap1}
\end{document}
  • Try \bibliographystyle{unsrtnat} instead of \bibliographystyle{unsrt}. I'm surprised this used to work, because it really should not have worked with unsrt. natbib needs additional information that unsrt can not provide, you really need an author-year compatible style like unsrtnat. This should have nothing to do with chapterbib as such. – moewe Sep 25 '18 at 14:59
1

natbib needs an author-year-compatible style to be able to display the author name in \citet. unsrt does not provide the necessary information, you'll have to use natbib's replacement for unsrt: unsrtnat.

Replace \bibliographystyle{unsrt} with

\bibliographystyle{unsrtnat}

and things will work.

This should have nothing to do with chapterbib.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.