I'm using this answer to print the number of times a reference was cited. Biblatex "sees" that the reference was cited in the figure caption but it will not step up the citecounter.
The following MWE will print cited 1 time on pages 1, 2.
Does anyone have an idea why that is? I appreciate any help.
\documentclass{report}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@book{Knuth,
author = {Knuth, Donald E.},
title = {The Art of Computer Programming, Volume 1: Fundamental Algorithms},
year = {1997},
publisher = {Addison Wesley Longman Publishing Co., Inc.},
}
\end{filecontents}
\usepackage[english]{babel}
\usepackage[backref=true,backend=biber,citecounter=true]{biblatex}
\addbibresource{references.bib}
\renewbibmacro*{pageref}
{%
\iflistundef{pageref}
{\printtext{\autocap{n}o citation in the text.}}
{
\printtext{\autocap{c}ited \arabic{citecounter} time\ifnumgreater{\value{citecounter}}{1}{s}{}}%
\setunit{\addspace}%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}
}
}
\DefineBibliographyStrings{english}
{
backrefpage = {on page},
backrefpages = {on pages},
}
\begin{document}
\cite{Knuth}
\newpage
\begin{figure}
\caption{\cite{Knuth}}
\end{figure}
\printbibliography
\end{document}
