# Prefix and conditional statement with biblatex

I would like to highlight the contributions of a given author in my list of bibliographic references. In order to do so, I'm thinking about adding his initials to the citation label. Something like what follows, knowing that the author to be highlighted is First Name:

• bib file

@article{label1,author = {First Name and author2},title = {title}}

@article{label2,author = {author2 and author3},title = {title}}

• main file

text: \cite{label1} \cite{label2}

• output:

text [FN1] [2]

• the list of references could be

[FN1] First Name 1, author2, title
[2] author1, author2, title

A very minimal MWE is suggested:

\documentclass{article}
\usepackage[style=numeric-comp,backend=biber,maxnames=99]{biblatex}
\begin{document}
text \cite{label1}, \cite{label2}
\end{document}


and refs.bib stores the following information

@article{label1,
author = {First Name and author2},
title = {title}
}

@article{label2,
author = {author2 and author3},
title = {title}
}


Automatic testing on the First Name author is preferred. Two separate lists would be acceptable but a single one is preferred.

• An MWE would nevertheless be appreciated. It gives us something to start from. It also shows us what style you use (numeric?) and saves us some work in making up .bib entries and stuff. Why is [2] not [A2] even though author1 contributed? Do you want biblatex to automatically detect the author or would you be OK with telling it yourself? Do you want the initials to be detected automatically or would you be OK with adding them to a special field yourself? – moewe Oct 14 '17 at 17:15
• @moewe Done. I've clarified what I could. – pluton Oct 14 '17 at 17:30
• Would shorthand = {FN1} help? – samcarter_is_at_topanswers.xyz Oct 14 '17 at 18:14
• @samcarter It looks like it replaces the expected citation number by FN and I do not want to enter the numbering by hand. – pluton Oct 14 '17 at 20:55

This is a little hackish, but it will do what you want. I've set the usera field with the prefix you want for a particular reference. Then I have used \AtEveryCitekey and \AtEveryBibitem to alter the label if usera is set.

MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{label1,
author = {First Name and author2},
title = {Title},
journaltitle = {Journal},
date = {2017},
usera = {FN}
}
@article{label2,
author = {author2 and author3},
title = {Title},
journaltitle = {Journal},
date = {2016}
}
\end{filecontents}
\pagestyle{empty}
\usepackage[style=numeric-comp,sorting=none,backend=biber,maxnames=99]{biblatex}
\AtEveryCitekey{%
\iffieldundef{usera}
{}
{\savefield*{usera}{\tempa}%
\restorefield{labelprefix}{\tempa}}}
\DeclareFieldFormat{labelnumberwidth}{%
\mkbibbrackets{%
\printfield{usera}%
#1}}
\begin{document}
text \cite{label1}, \cite{label2}
\printbibliography
\end{document}