I have been using the regular \cite command for my citations all the time. But now I used the 'natbib' package and instead used \citep and \citet, but this keeps giving me errors in the natbib.sty file which it creates. I also get the error 'command \bibhang already defined'.
Does anyone have experience with this?
\documentclass[a4paper,12pt]{report}
\usepackage{graphicx}
\usepackage[backend=biber]{biblatex}
\usepackage{algorithm}
\usepackage{caption}
\usepackage[comma,authoryear]{natbib}
\bibliographystyle{ieeetr}
\addbibresource{bib/literature.bib}
\begin{document}[a4paper,12pt]
\chapter*{Declaration}
\chapter*{Abstract}
\chapter*{List of abbrevations and symbols}
\tableofcontents
\chapter{Introduction}
as mentioned in \citet{england2002}
\section{Insurance industry}
\section{IBNR Claims and Claims Reserving}
\section{Link with GLM}
\section{Robustification and Problems}
\section{Applications}
\chapter{Body}
\chapter{Conclusion}
\printbibliography
\end{document}
using this .bib file:
@article{england2002,
title={Stochastic claims reserving in general insurance},
author={England, Peter D and Verrall, Richard J},
journal={British Actuarial Journal},
volume={8},
number={03},
pages={443--518},
year={2002},
publisher={Cambridge Univ Press}
}
Best Answer
There are several problems with your example code.
You should start by immediately removing both arguments from the
document
environment. The instruction should readrather than
\begin{document}[a4paper,12pt]
. Thedocument
environment does not take arguments. Nothing good is going to come from supplying arguments, optional or otherwise, to thedocument
environment.Don't load both the
biblatex
package and thenatbib
package. Select one or the other, but not both.Assuming you want to continue with
natbib
(@Johannes_B's learned opinion notwithsstanding...), you need to observe that theieeetr
bibliography style is not compatible with authoryear-style citation call-outs. You should therefore load thenatbib
package with the optionsnumbers
andcomma
, notauthoryear
andcomma
. Don't forget to delete the instruction\addbibresource{bib/literature.bib}
and to replace\printbibliography
with\bibliography{bib/literature}
-- note: no filename extension. By the way, with numeric-style citation call-outs in use,\citet
will give you a warning message; use\cite
instead.If you do need or want authoryear-style citation call-outs along with IEEE-style formatted bib entries, I suggest you switch to the
IEEEtranN
bibliography style. If you go this route, be sure to omit thenumbers
option when loadingnatbib
.The output from your (somewhat condensed) working example then is as follows.