Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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}

Output

share|improve this answer
    
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
    
The documentation of the biblatex-ieee package is very short (1 page of instructions and 3 pages of examples), but it does address the url issue. About localization, I tested it on a french document of mine and it seems perfectly localized. What strings are you missing? –  T. Verron Mar 9 '13 at 23:27

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}

enter image description here


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

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

enter image description here

share|improve this answer
    
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
1  
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
3  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.