Please see the mwe below
\NeedsTeXFormat{LaTeX2e}
\documentclass[12pt]{article}
\usepackage[backend=biber,%
isbn=false,%
style=numeric,%
sorting=ydnt,%
giveninits=true,% initials of first names
maxbibnames=20,%
defernumbers,%
labeldateparts,% for academic cv
locallabelwidth% for academic cv
]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname_a.bib}
@Article{Fabulous2016a,
author = {Fabulous, Jason},
title = {How to be fabulous - The Story of My Life},
journal = {Fancy Journal},
year = {2016},
volume = {56},
number = {3},
pages = {1-99},
keywords = {include},
}
@Article{FabulousFaulkner2019a,
author = {Fabulous, Jason and Faulkner, Trent},
title = {One Fabulous Moment after Another - A chat with my buddy Trent},
journal = {Journal},
year = {2018},
volume = {56},
number = {3},
pages = {1-99},
keywords = {},
}
\end{filecontents}
\begin{filecontents}{\jobname_b.bib}
@Article{Fuca2019a,
author = {Fuca, Wanda},
title = {Ridges, Plates and Seamounts},
journal = {Journal 2},
year = {2019},
volume = {56},
number = {3},
pages = {1-99},
keywords = {include},
}
@Article{Fuca2015a,
author = {Fuca, Wanda},
title = {How to truly know whether your parents were Hippies},
journal = {Journal},
year = {2015},
volume = {56},
number = {3},
pages = {1-99},
keywords = {include},
}
\end{filecontents}
\begin{filecontents}{cvsectionnum.tex}
% define a bibenvironment for an numbered bib entry
\defbibenvironment{bibenvcvsectionnum}%
{\list%
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}%
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}%
{\endlist}%
{\item}%
% cvsectionnum
\newcommand\cvsectionnum[3]{%
\section*{#1}%
\begin{refsection}[#2]%
\nocite{*}%
\printbibliography[heading=none,env=bibenvcvsectionnum,#3]%
\end{refsection}%
}%
\end{filecontents}
\begin{filecontents}{reverse_order_bib_entry_numbering.tex}
\AtDataInput{%
\csnumgdef{entrycount:\therefsection}{%
\csuse{entrycount:\therefsection}+1}}%
%
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}%
\newrobustcmd*{\mkbibdesc}[1]{%
\number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}%
\end{filecontents}
\addbibresource{\jobname_a.bib}%
\addbibresource{\jobname_b.bib}%
% declare section names
\def\sectiona{J's Publications}%
\def\sectionb{Wanda's Pulications}%
% definition of `cvsectionnum'
\input{cvsectionnum.tex}
% reverse order numbering
\input{reverse_order_bib_entry_numbering.tex}
\begin{document}
% J
\cvsectionnum{\sectiona}{\jobname_a.bib}{keyword={include}}%
% Wanda
\cvsectionnum{\sectionb}{\jobname_b.bib}{keyword={include}}%
\end{document}
Here is what the output looks like:
The question is, how to make J's bib entry have a 1 as a label instead of a 2? Via the keywords functionality, we are filtering each of the publication lists passed to the cvsectionnum command, yet it seems that the counter is being determined before filtering, hence the out of range and non-sequential label.
This post might also provide additional context.



filecontents. – John Chris Oct 27 '19 at 13:52