# Forcing non-identical author names to be compressed

## Background

When using a compressed author/year style such as authoryear-comp, biblatex will disambiguate names using initials, if two authors share the same last name. It's possible to turn off this disambiguation with respect to outputting the initials in the citations, using the uniquename=false option. This works to suppress the initials, but it doesn't work to further compress the two names.

Of course this behaviour makes sense, since biblatex/biber can't tell that two authors with slightly different names are the same person. But a human can.

## Question

Is there a way to tell biblatex/biber to treat two non-identical names as identical for the purpose of compressing the names? If so, how?

## Rationale

To stave off "Don't do this" comments, there are quite reasonable reasons to want to do this. Authors are sometimes very inconsistent with how their name appears in their published work, sometimes with their name shortened, sometimes not, sometimes with a middle initial sometimes not. So it would be useful to allow some sort of a name "alias" which would tell biblatex/biber to treat all instances of a name as identical for the purposes of uniquename and compression. Normalizing the names in the .bib file is not really an option, because then they will not match the actual published name.

## MWE

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Smith2000,
Author = {Smith, John},
Title = {Some dubious results},
Journal = {A Great Journal},
Year = {2000},
Volume = {1},
Number = {1}
}
@article{Smith2001,
Author = {Smith, John A.},
Title = {Some more dubious results},
Journal = {A Great Journal},
Year = {2001},
Volume = {1},
Number = {1}
}
\end{filecontents*}
\usepackage[style=authoryear-comp,uniquename=false]{biblatex}
\begin{document}
\parencite{Smith2000,Smith2001}
\printbibliography
\end{document}


## Desired output

I would only like to change the compressed citation callouts, not the bibliography output itself.

• As an aside, depending on your style, it might not matter to normalise the names. e.g., the SBL Handbook of Style states: "Multiple references to the same author in a bibliography should be conformed to the same style; regardless of how names appear on title pages, authors should not be listed under one name for one work and under a different form of their name for another work." Jun 22, 2019 at 1:35
• @DavidPurton Yes, and to an extent, that makes sense, and I see the urge to do it. But I certainly wouldn't want to do that to my .bib file itself I think. Jun 22, 2019 at 1:47

Happily, this feature already exists. See \DeclareLabelname in the biblatex manual. You can use the shortauthor field to specify "Smith" as the labelname and they will compress as you want.

# Update

You could also employ a source map so you don't need to adjust your bib file. Something like this:

\DeclareSourcemap{
\maps{
% Smith, John A.
\map{
\step[fieldsource=author, match={Smith, John}, final]
\step[fieldset=shortauthor, fieldvalue={Smith, John A.}]
}
\map{
\step[fieldsource=author, match={Smith, J. A.}, final]
\step[fieldset=shortauthor, fieldvalue={Smith, John A.}]
}
% Doe, Jane B.
\map{
\step[fieldsource=editor, match={Doe, Jane}, final]
\step[fieldset=shorteditor, fieldvalue={Doe, Jane B.}]
}
\map{
\step[fieldsource=editor, match={Doe, J. B}, final]
\step[fieldset=shorteditor, fieldvalue={Doe, Jane B.}]
}
}
}


# Original MWE

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Smith2000,
Author = {Smith, John},
ShortAuthor = {Smith},
Title = {Some dubious results},
Journal = {A Great Journal},
Year = {2000},
Volume = {1},
Number = {1}
}
@article{Smith2001,
Author = {Smith, John A.},
ShortAuthor = {Smith},
Title = {Some more dubious results},
Journal = {A Great Journal},
Year = {2001},
Volume = {1},
Number = {1}
}
\end{filecontents*}
\usepackage[style=authoryear-comp,uniquename=false]{biblatex}

• Fantastic! Thanks. One question, should the shortauthor field just be the last name, or the name that I want all the entries to normalize as? In your example you've just used "Smith", but could you have used "Smith, John" so long as all the relevant items had the same shortauthor? Jun 22, 2019 at 1:45
• I've just seen the sourcemap version you've added. Thanks! That's an interesting way of doing it, although I think in this case it might be more practical to modify the actual .bib file, since this is something I don't want to have to remember on a per-document basis. :) Jun 22, 2019 at 3:52
• The sourcemap approach needs some finals and would then have to split off the \steps into multiple \maps. One could use \$MAPLOOP to avoid having to write separate maps for author and editor. Unfortunately, I couldn't quite manage to combine those two suggestions: github.com/plk/biber/issues/269 Jun 22, 2019 at 5:04