文内引用不起作用

文内引用不起作用

考虑下面的 MWE。

所有引用都有效,除了england2002。它只返回英国2002但没有引用。如何解决这个问题?

\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

这是您的代码的一个工作示例,其中有一些更正。

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

另请参阅背页。Overleaf(一个在线 TeX 环境)的链接可能有助于重现 MWE。

相关内容