如何在使用 biblatex 时消除此警告

如何在使用 biblatex 时消除此警告

如果我使用该软件包hyperref并引用一篇论文而不打印参考书目,我会收到以下警告

pdfTeX warning(dest): name{cite.0@<paper_name>} has been referenced but does not exist, replaced by a fixed one

以下是一个例子:

% !TEX TS-program = pdflatex
% arara: pdflatex
% arara: biber
% arara: pdflatex
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{ref.bib}
@Article{doc,
Title = {A title},
Author = {Some guy}}
\end{filecontents}
%
\usepackage{hyperref}
\usepackage[backend=biber]{biblatex}
\addbibresource{ref.bib}
\begin{document}
Here is some more text using the old key \cite{doc}.
\end{document}

警告位置如下:

pdfTeX warning(dest): name{cite.0@doc} has been referenced but does not exist, replaced by a fixed one

我怎样才能使这个警告静音?

答案1

您可以使用选项 hyperref=false。这样 biblatex 将不会尝试在引文和不存在的参考书目之间创建链接。

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{ref.bib}
@Article{doc,
Title = {A title},
Author = {Some guy}}
\end{filecontents}
%

\usepackage[backend=biber,hyperref=false]{biblatex}
\usepackage{hyperref}
\addbibresource{ref.bib}
\begin{document}
Here is some more text using the old key \cite{doc}.

\end{document}

相关内容