1

Consider the MWE below.

All the citations work, except for england2002. It only returns england2002 but no citations. How can this be solved?

\documentclass[a4paper,12pt]{report}
\usepackage[backend=biber, natbib=true, style=authoryear, uniquename=false]   {biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{renshaw1998,
title={A stochastic model underlying the chain-ladder technique},
author={Renshaw, Arthur E and Verrall, Richard J},
journal={British Actuarial Journal},
volume={4},
number={04},
pages={903--923},
year={1998},
publisher={Cambridge Univ Press}
}

@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}
}

@book{efron1994,
title={An introduction to the bootstrap},
author={Efron, Bradley and Tibshirani, Robert J},
year={1994},
publisher={CRC press}
}
\end{filecontents}

\begin{document}[a4paper,12pt]

I cite  \citet{renshaw1998} and \citet{england2002} and \citet{efron1994}
\end{document}
  • 1. Try to put the question out from the MWE. 2. What is the purpose the environment filecontents? 3. Why you repeat the class options after open the document environment? – Aradnix Apr 22 '15 at 18:37
  • The MWE works absolutely fine here, if I add \addbibresource{\jobname.bib} and ignore the spurious [a4paper,12pt]. Did you run pdflatex <document>, biber <document>, pdflatex <document>? Were there any errors/warnings issued by Biber? – moewe Apr 22 '15 at 18:51
  • The code produces errors when pasted in Overleaf. – rvaneijk Apr 22 '15 at 21:03
1

Here is a working example of your code, with some corrections.

\documentclass[a4paper,12pt]{report}
%!!! changed, use of biblatex moved after filecontents
\usepackage{filecontents}
\begin{filecontents}{bib}    %!!! changed, jobname removed
@article{renshaw1998,
title={A stochastic model underlying the chain-ladder technique},
author={Renshaw, Arthur E and Verrall, Richard J},
journal={British Actuarial Journal},
volume={4},
number={04},
pages={903--923},
year={1998},
publisher={Cambridge Univ Press}
}

@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}
}

@book{efron1994,
title={An introduction to the bootstrap},
author={Efron, Bradley and Tibshirani, Robert J},
year={1994},
publisher={CRC press}
}
\end{filecontents}
\usepackage[style=alphabetic,citestyle=alphabetic,backend=biber,backref=true]{biblatex}    %!!! changed and moved here
\addbibresource{bib}    %!!! new, declearation inserted
\DeclareFieldFormat[inbook]{citetitle}{#1}    %!!! new, optional
\DeclareFieldFormat[inbook]{title}{#1}    %!!! new, optional

\begin{document}    %!!! changed, declarion already handled in documentclass

I cite \cite{renshaw1998} and \cite{england2002} and \cite{efron1994}        %!!! changed

% bibliography    %!!! new, optional
\printbibliography    %!!! new, optional
\end{document} 

See also in Overleaf. The link to Overleaf - an online TeX environment - may come handy to reproduce the MWE.

  • \DeclareFieldFormat[inbook] is optional – rvaneijk Apr 22 '15 at 21:06
  • 1
    Please explain your corrections and mark them in your code, for example by '%!!! changed' or ... Suppose the reader is a beginner and not able to localize or understand your changes ... And why the link to overleaf? – Kurt Apr 23 '15 at 12:20

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.