# Dashed bibliography with alphabetic style

I recently switched a document where the bibliography was generated with bibtex using the amsalpha bibstyle to biblatex. The alphabetic style looks nice enough, but I am missing the dashes that amsalpha generated if an author had multiple entries. biblatexes documentation states that the dashed option is only available for authoryear and some other style, but not for alphabetic. Why is that, and how do I get the dashes back?

-

## 2 Answers

An alternative solution is to use the ieee-alphabetic style, provided by the biblatex-ieee bundle. I'm not sure yet that there isn't any critical difference with the alphabetic style, but it has the essentials at least: alphabetic labels and grouping of similar authors with dashes.

\usepackage[style=ieee-alphabetic]{biblatex}


-
Thank you! Looks OK. For the record: This style is loaded with \usepackage[style=ieee-alphabetic]{biblatex}. Strangely enough, \usepackage[style=ieee]{biblatex} does not work, maybe I should update TeXlive. – Percival Ulysses Mar 9 '13 at 18:12
Oh, right, wanted to add it, forgot for whatever reason. Thanks for reminding me! Btw, if ieee-alphabetic works, ieee should as well, as they're part of the same package! What's the error, exactly? – T. Verron Mar 9 '13 at 21:50
It just does not compile with ieee, but since I don't need it right now, I don't care too much. Thanks again! – Percival Ulysses Mar 9 '13 at 22:01
Other things I noticed about the ieee style: It is only localized for the english language, and I don't like how URLs are formatted. The latter can be changed by adding \DefineBibliographyStrings{english}{url = URL\addspace ,} in the preamble. – Percival Ulysses Mar 9 '13 at 23:09
@T.Verron: One difference with amsalpha is that it abbreviates given names of authors even if that isn't what one wants. Do you know a workaround? – jdc Feb 11 '15 at 5:45

Based on the (now deleted) idea of T.Verron you can use a bibstyle which supports the dash-option. Instead of the predefined bibliography environment of authortitle you can use the default of alphabetic. All needed options to provide the labels are down by the style alphabetic:

\documentclass{article}
\usepackage[style=alphabetic,bibstyle=authortitle]{biblatex}

\DeclareNameAlias{author}{default}
\DeclareNameAlias{editor}{default}
\DeclareNameAlias{translator}{default}

\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
{\list
{\printtext[labelalphawidth]{%
\printfield{prefixnumber}%
\printfield{labelalpha}%
\printfield{extraalpha}}}
{\setlength{\labelwidth}{\labelalphawidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{##1\hss}}
{\endlist}
{\item}

\defbibenvironment{shorthands}
{\list
{\printfield[shorthandwidth]{shorthand}}
{\setlength{\labelwidth}{\shorthandwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}%
\renewcommand*{\makelabel}[1]{##1\hss}}}
{\endlist}
{\item}

\addbibresource{biblatex-examples.bib}
\begin{document}
Text
\cite{knuth:ct,knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e}
\printbibliography
\end{document}


To setup the format of the dash you can define the dash as follows:

\renewcommand*{\bibnamedash}{\mbox{\textemdash\space}}


-
Thank you. But somehow … I have a feeling that there exists a more elegant solution – or that there should exist one, at least. – Percival Ulysses Mar 8 '13 at 14:25
For whatever reason, the space after the dash seems far too large. – lockstep Mar 8 '13 at 14:25
@PercivalUlysses: The more elegant solution would be the implementation of the feature in the style alphabetic itself. – Marco Daniel Mar 8 '13 at 14:28
"[…] implementation of the feature in the style alphabetic itself" I agree. – Percival Ulysses Mar 8 '13 at 14:55
traditionally, the length of the dash is 3 ems. that can be decided at the (la)tex level, which is why amsalpha.bst (and other ams biblio processors) encode the duplication as \bysame. – barbara beeton Mar 8 '13 at 15:16