As a follow up to this question and moewe's answer, I am trying to figure out why the citation labels in the annotated bibliography are not printed correctly. Here's the MWE:
\documentclass{amsart}
\usepackage{blindtext}
\usepackage[sorting=ynt, backend=biber, style=numeric-comp]{biblatex}
\usepackage{hyperref}
\assignrefcontextentries*[sorting=nyt, labelprefix=A]{*}
\newtoggle{showannotation}
\toggletrue{showannotation}
\renewbibmacro*{finentry}{%
\iftoggle{showannotation}
{\setunit{\par}%
\printfield{annotation}}
{}%
\finentry}
\setlength{\bibitemsep}{.5\baselineskip}
\setlength{\bibparsep}{.5\bibitemsep}
\newlength{\bibparindent}
\setlength{\bibparindent}{0pt}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\setlength{\listparindent}{\bibparindent}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article {ref1,
AUTHOR = {Chebyshev, P.},
TITLE = {{Lettre de M. le professeur Tchebychev a M. Fuss, sur un nouveau th{e}oreme relatif aux nombres premiers contenus dans la formes $4n+1$ et $4n+3$.}},
FJOURNAL = {Bull. de la Classe phys. math. de l'Acad. Imp. des Sciences St. Petersburg},
VOLUME = {11},
YEAR = {1853},
LANGUAGE = {french},
annotation = {Chebyshev's paper which was the starting point of the subject.},
}
@article{ref2,
AUTHOR = {Phragmen, P.},
TITLE = {{Sur le logarithme integral et la fonction $f(x)$ de Riemann}},
YEAR = {1891},
FJOURNAL = {\"{O}fversigt af Kongl. Vetenskaps--Akademiens F\"{o}handlingar.},
LANGUAGE = {French},
VOLUME = {48},
annotation = {\blindtext \par This article cites~\cite{ref4, ref5}.},
}
@article{ref3,
AUTHOR = {Landau, E.},
TITLE = {{U}ber einen {S}atz von {T}schebyschef},
JOURNAL = {Math. Ann.},
FJOURNAL = {Mathematische Annalen},
VOLUME = {61},
YEAR = {1906},
NUMBER = {4},
}
@article{ref4,
author={Littlewood, J. E. },
title={{Sur la distribution des nombres premiers}},
year={1914},
volume={158},
journal={Comptes Rendus de l'Acad. Sci. Paris},
language={French},
annotation = {This article cites~\cite{ref4, ref5}.}
}
@article{ref5,
author={Hardy, G. H. and Littlewood, J. E. },
title={{Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes}},
year={1916},
journal={Acta Math.},
volume={41},
number={1},
annotation = {This article cites~\cite{ref1, ref4, ref3}.},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\section{Chronological bibliography}
\printbibliography[heading=none]
\section{Alphabetic bibliography}
\togglefalse{showannotation}
\newrefcontext[sorting=nyt, labelprefix=A]
\printbibliography[heading=none]
\end{document}
Now if I want to see [4, 5]
instead of [A4, A5]
(get rid of the A), so as moewe mentioned, the natural way to do that would be to remove labelprefix=A
in assignrefcontextentries
. However, when I do that, the reference labels are not printed correctly (my own labels are printed: [ref4, ref5]
). I've attached a screenshot. I do not understand why having a label prefix would confuse biblatex from printing the cite labels.