labelprefix to newrefcontext replacing prefixnumbers to printbibliography not working

The MWE

\documentclass{article}

\usepackage[style=ieee, backend=biber, defernumbers=true, maxnames=10]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{test-conference,
  author    = {Test Author 1},
  title     = {Test Title 1},
  booktitle = {Test Booktitle 1},
  year      = {2016},
  keywords  = {C},
}
@inproceedings{test-workshop,
  author    = {Test Author 2},
  title     = {Test Title 2},
  booktitle = {Test Booktitle 2},
  year      = {2016},
  keywords  = {W},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Conference paper: \cite{test-conference}
Workshop paper: \cite{test-workshop}.

\defbibnote{conference}{Conference Papers}
\defbibnote{workshop}{Workshop Papers}

\newrefcontext[labelprefix=C]
\printbibliography[prenote=conference, keyword=C] 
\newrefcontext[labelprefix=W]
\printbibliography[prenote=workshop, keyword=W] 
\end{document}

produces the desired and expected output

Conference paper: [C1] Workshop paper: [W1].

But you will have to use Biber instead of BibTeX, because only Biber supports labelprefix properly. (Starting with biblatex 3.13 a rudimentary version of labelprefix is supported even with the BibTeX backend, but there are some differences to the proper/full implementation available with Biber, see https://github.com/plk/biblatex/issues/852. In general you can only use all of biblatex's features with Biber, so it is a very good idea to switch to Biber anyway.)

Since this MWE needs to use defernumbers it may happen that the citation numbers get stuck at "[0]" or in a different unwanted numbering. In those cases it helps to remove the temporary files (.aux, .bbl, .bcf, ...) and recompile from scratch.


In very specific situations you may have to have to make sure that the entries belong to the correct refsection even in the citations. Usually this should not be needed, though.

Then you would use \assignrefcontextkeyws to make sure the citations get it right. See §3.7.10 Reference Contexts of the biblatex documentation, especially pp. 94-99.


This should just work as is. The labels in citations pick up the label in the last bibliography in which the reference was printed, by default. This is almost always what you want and with this MWE, it works fine for me. Perhaps a problem with the ieee style?

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{references.bib}
  @inproceedings{test-conference,
    author = {Test Author 1},
    title = {Test Title 1},
    booktitle = {Test Booktitle 1},
    year = {2016},
    keywords = {C}
  }
  @inproceedings{test-workshop,
    author = {Test Author 2},
    title = {Test Title 2},
    booktitle = {Test Booktitle 2},
    year = {2016},
    keywords = {W}
  }
\end{filecontents}

\usepackage[style=numeric, bibencoding=ascii, defernumbers=true, maxnames=10]{biblatex}
\addbibresource{references.bib}


\begin{document}

Conference paper: \cite{test-conference}
Workshop paper: \cite{test-workshop}.

\defbibnote{conference}{Conference Papers}
\defbibnote{workshop}{Workshop Papers}

\newrefcontext[labelprefix=C]
\printbibliography[prenote=conference, keyword=C] 
\newrefcontext[labelprefix=W]
\printbibliography[prenote=workshop, keyword=W] 

\end{document}

enter image description here