Adding asterisk to all citations in bibliography with a given author name

biblatex

I am using biblatex to produce a bibliography. What I'd like to do is to find all citations with a given author (even if it is a citation with multiple authors), and add an asterisk in front of the citation. So for instance, I want to make sure all citations with Joe Bloggs as one of the authors gets formatted like this:

[* 1] John Smith, Joe Bloggs. "Make great discovery for glorious nation". In: Journal for New Stuff. (1)1. pp. 1-10.

Is this possible?

The reason I want to do this is to mark publications where I am the author in citations with an asterisk.

\documentclass{article}
\usepackage[backend=biber,style=numeric]{biblatex}

%\usepackage{filecontents}

\begin{filecontents}{bam.bib}
  @incollection{Bloggs:1,
      title={Radio Resource Management for Device-to-Device Communications in Long Term Evolution Networks},
      author={Joe Bloggs and John Smith},
      booktitle={Resource Allocation and {MIMO} for {4G} and Beyond},
      publisher={Springer Science+Business Media},
      year=2014,
      address={New York, USA},
      editor={Francisco Rodrigo Porto Cavalcanti},
      pages={105-156},
      doi={10.1007/978-1-4614-8057-0_3},
      isbn={978-1-4614-8056-3},
    }
\end{filecontents}

\addbibresource{bam.bib}
\DeclareBibliographyCategory{asterisk}
\addtocategory{asterisk}{Bloggs:1}
\DeclareFieldFormat{labelnumber}{\ifcategory{asterisk}{*#1}{#1}}

\begin{document}
\cite{Bloggs:1}
\printbibliography
\end{document}

Best Answer

One way to check if an entry involves one particular author is via regexp-matching the author field in a sourcemap. See biblatex: separating publications of a specific author in the bibliography.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[backend=biber, style=numeric]{biblatex}


\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite]{
      \step[fieldsource=author,
            match=\regexp{\b(Joe\s+Bloggs|Bloggs,\s+Joe)\b},
            final]
      \step[fieldset=keywords, fieldvalue={, }, appendstrict]
      \step[fieldset=keywords, fieldvalue=filternames, append]
    }
  }
}

\DeclareFieldFormat{labelnumber}{%
  \ifkeyword{filternames}
    {*}
    {}%
  #1}

\begin{filecontents}{\jobname.bib}
@incollection{Bloggs:1,
  title     = {Radio Resource Management for Device-to-Device
               Communications in Long Term Evolution Networks},
  author    = {Joe Bloggs and John Smith},
  booktitle = {Resource Allocation and {MIMO} for {4G} and Beyond},
  publisher = {Springer Science+Business Media},
  year      = 2014,
  address   = {New York, USA},
  editor    = {Francisco Rodrigo Porto Cavalcanti},
  pages     = {105-156},
  doi       = {10.1007/978-1-4614-8057-0_3},
  isbn      = {978-1-4614-8056-3},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,Bloggs:1}

\printbibliography
\end{document}

[*1] Joe Bloggs and John Smith. “Radio Resource Management for Device-to-Device Communications in Long Term Evolution Networks”. In: Resource Allocation and MIMO for 4G and Beyond.
[2] Emma Sigfridsson and Ulf Ryde. “Comparison of methods for deriving atomic charges from the electrostatic potential and moments”. In: Journal of Computational Chemistry