# Biblatex dashed entries with “sortname” and “shortauthor”

In a bibliography with dashed entries, I'd prefer variants like J. Lennon and John Lennon to behave as the same name. In other words, the latter entry should be dashed. I've tried to enforce this by setting SHORTAUTHOR = "John Lennon", SORTNAME = "John Lennon" in the entry for J. Lennon, but it has no effect.

How can I get a dashed entry for the lennon1971 entry in the following example?

\documentclass{article}
\usepackage[style = authoryear-comp, dashed = true, sorting = nyt]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1970,
AUTHOR = "J. Lennon",
TITLE = "My life with the Beatles",
YEAR = "1970",
SHORTAUTHOR = "John Lennon",
SORTNAME = "John Lennon"}
@BOOK{lennon1971,
AUTHOR = "John Lennon",
TITLE = "Moving on",
YEAR = "1971"}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document}


• You could use a biber sourcemap to change all Lennon names to something the same and then dashes would work. This way you don't have to change the source .bib. – PLK Nov 16 '14 at 18:52
• @PLK Sounds reasonable. I'll see if I can manage on my own before I'll ask you to show me how :) – Sverre Nov 16 '14 at 18:53
• @PLK How about this: If there's something specified in the shortauthor field, use that to replace whatever is in author? – Sverre Nov 16 '14 at 18:57
• Just curious but why should the entry match the bibliographic source if there is no doubt that 'A. Smith' is, in fact, the same person as 'Anna Smith'? (I ask partly because my entries definitely do not obey this rule.) – cfr Nov 16 '14 at 20:49
• @cfr Yes, I think I have reached the same conclusion, that I shouldn't dash an entry if the non-dashed entry has information that differs from the dashed entry. – Sverre Nov 17 '14 at 19:14

As suggested by PLK in the comments, you can use a sourcemap to replace some forms of the name for another standardized one, without having to change your bib file.

\documentclass{article}
\usepackage[style = authoryear-comp, dashed = true, sorting = nyt]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1970,
AUTHOR = "J. Lennon",
TITLE = "My life with the Beatles",
YEAR = "1970"}
@BOOK{lennon1971,
AUTHOR = "John Lennon",
TITLE = "Moving on",
YEAR = "1971"}
\end{filecontents}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author,
match={J. Lennon},
replace={John Lennon}]
}
}
}
\begin{document}
\nocite{*}
\printbibliography
\end{document}