1

I'm trying to use biblatex to obtain a bibliography with the following characteristics: 1) it should be divided into two sections (i.e., "Journal Papers" and "Conference Papers"); 2) each entry in the first (resp. second) section should have a prefix "J" (resp. "C"); 3) the entries should be in reversed order.

So far, I've been able to achieve points 1) and 3) above, but not point 2), that is, I obtain

Journal Papers
[2]
[1]

Conference Papers
[2]
[1]

instead of

Journal Papers
[J2]
[J1]

Conference Papers
[C2]
[C1]

Here's my MWE, which is inspired by other similar topics (namely, biblatex: Reverse numbering (i.e., count down) and Multibib reverse label or sort order):

\documentclass{article}

\usepackage{etoolbox}
\usepackage[backend=bibtex,style=ieee,sorting=ydnt,defernumbers]{biblatex}

\AtDataInput{%
  \csnumgdef{entrycount:\therefsection}{%
    \csuse{entrycount:\therefsection}+1}}

\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}    
\newrobustcmd*{\mkbibdesc}[1]{%
  \number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}

\addbibresource[label=journals]{my_publications.bib}
\addbibresource[label=conferences]{my_publications.bib}

\begin{document}

\begin{refsection}[journals]
  \nocite{journal1,journal2}
  \printbibliography[prefixnumbers={J},title={Journal Papers}]
\end{refsection}
\begin{refsection}[conferences]
  \nocite{conf1,conf2}
  \printbibliography[prefixnumbers={C},title={Conference Papers}]
\end{refsection}

\end{document}

I compile using the following commands:

latex doc
bibtex doc1-blx
bibtex doc2-blx
latex doc
pdflatex doc

What am I doing wrong?

TheDon
  • 755

1 Answers1

1

You cannot use prefixnumber anymore. You should use \newrefcontext[labelprefix=J] on the line above printbiliography.

erichlf
  • 131