1

(I'm not sure the post title is good enough)

I'm using biblatex with biber and printing the bibliography by part with refsection=part.

The MWE below produces a warning from hyperref.

name{cite.0@foo} has been referenced but does not exist, replaced by a fixed one

I believe it is because there is no bibliography before the first part so the citation link points to nothing.

I'd like to solve that since it is the only warning in my document!!

MWE

% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
\documentclass{report}
\usepackage{filecontents}
\begin{filecontents}{foo.bib}
@book{foo,
author = {author},
title = {title},
date = {2019},
}
\end{filecontents}

\usepackage[backend=biber, refsection=part, citestyle=alphabetic, backref=true, style=alphabetic]{biblatex}
\addbibresource{foo.bib}

\defbibheading{bibliography}{%
  \cleardoublepage
  \chapter*{\bibname\ of \thepart}%
  \thispagestyle{plain}%
}

\usepackage{hyperref}

\begin{document}
By \cite{foo}
\part{title}
Again by \cite{foo}
\printbibliography
\end{document}
  • Note that the warning is a symptom of the underlying problem that your first part has no corresponding bibliography. That might not seem bad at first, but check out \documentclass{report} \usepackage[backend=biber, refsection=part, style=alphabetic]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} By \cite{knuth:ct:b} \part{title} Again by \cite{knuth:ct:b,knuth:ct:c} \printbibliography \end{document} – moewe Apr 4 '19 at 19:34
2

A simpler example is the following. And yes you get the warning as the link has no target. One solution is to provide a target somewhere with \hypertarget (or by adding a \printbibliography in this refsection. Another solution would be a cite command that doesn't create a link.

\documentclass{report}

\usepackage[]{biblatex}
\addbibresource{biblatex-examples.bib}

\usepackage{hyperref}

\begin{document}
By  \cite{doody}

%\hypertarget{cite.0@doody}{}
\end{document}
  • I searched a lot for this biblatex-examples.bib. I should record it somewhere. – Sigur Apr 4 '19 at 18:44
  • ...cite command that doesn't create a link. Does the biblatex package provide such command? – Sigur Apr 4 '19 at 18:45
  • 1
    I didn't see one, but imho it could be useful in certain places. Make a feature request or ask @moewe. – Ulrike Fischer Apr 4 '19 at 18:47
  • Thanks so much. hypertarget worked very well. – Sigur Apr 4 '19 at 18:47

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.