# \DeclareLabelname not working in biblatex 3.0

I recently upgraded to TeX Live 2015 and biblatex version 3.0. Since the upgrade, there is unexpected behavior with respect to my in-text author-year citations.

As I describe in this answer, I reserve the author field in my .bib entries for the author's name as formatted in the actual source. To unify authors who have published under various permutations of their name (authority control), I use the sortname field in my .bib entries and the use \DeclareLabelname to put sortname before author in the list of fields stored in labelname. With biblatex 2.9a, this allowed in-text citations to be grouped by sortname rather than author.

## MWE

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{dembetembe1974,
title = {Three {Korekore} dialects},
volume = {15},
pages = {143--172},
journaltitle = {Journal of African Languages},
author = {Dembetembe, Norris C.},
date = {1974}
}
@thesis{dembetembe1976,
location = {London},
title = {The syntax of sentential complements in {Shona}},
institution = {University of London},
type = {phdthesis},
author = {Dembetembe, Norris Clemens},
sortname = {Dembetembe, Norris C.},
date = {1976}
}
@article{dembetembe1986,
title = {Aspects of negation in {Shona}},
volume = {6},
pages = {1--10},
number = {1},
journaltitle = {South African Journal of African Languages},
author = {Dembetembe, N. C.},
sortname = {Dembetembe, Norris C.},
date = {1986}
}
\end{filecontents}

\documentclass{article}

\usepackage[style=authoryear-comp,
dashed=false, % no dash in bibliography
uniquename=init, % we can still disambiguate names in citations
firstinits=false, % full names are used in bibliography
backend=biber]{biblatex}

\DeclareLabelname{
\field{sortname}
\field{shortauthor}
\field{author}
\field{shorteditor}
\field{editor}
\field{translator}
}

\bibliography{\jobname}

\begin{document}

\parencite{dembetembe1974,dembetembe1976,dembetembe1986}

\printbibliography

\end{document}


## Intended Output (worked with biblatex 2.9a)

However, with biblatex 3.0, for .bib entries where there is a sortname field, none of the fields that should be in labelname according to my \DeclareLabelname command are being used in the in-text citation. Instead, the title field is being used. Perhaps labelname is being resolved as undefined and so labeltitle is being used in its place?

## Actual Output with biblatex 3.0

I see in the biblatex changelog that version 3.0 moved the resolution of labelname and labeltitle from biber to biblatex, and I assume that this is the source of the change in my output, but I'm not sure how to get the intended behavior back.

• It indeed seems like the labelname is not generated for those entries that feature a sortname. That is probably worth a bug report at the biblatex bug tracker. – moewe Jul 21 '15 at 6:19
• @moewe, thanks. I submitted a bug report. – Jason Zentz Jul 22 '15 at 19:16

This is an interesting case. Before biber 2.0/biblatex 3.0 labelname was, as you say, generated by biber but is now instantiated by biblatex. Biber doesn't pass sortname back out in the .bbl as it's only used for sorting and biblatex shouldn't need it. Therefore, this shouldn't really ever have worked but it did because biber had access to sortname while it was processing labelname generation. Really, this should be done using a user field like namea. Try this:

\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=sortname]
\step[fieldset=namea, origfieldval, final]
}
}
}

\DeclareLabelname{
\field{namea}
\field{shortauthor}
\field{author}
\field{shorteditor}
\field{editor}
\field{translator}
}