15

the alphabetic style of biblatex is already very close to my requirements, but considering the following entry

@BOOK{smith1,
  author = {John Smith and Mike Someone},
  title = {The book with a very very very very very long title},
  year = {2005},
  publisher = {Publisher},
  location = {New York}
}

I would like to have a label like [Smith, 2005] instead of [Smi+05]. In other words:

[<first author's last name>, <year with 4 digits>]

In case there is more than one entry with the same author and the same year, a single letter should be added right behind the year like in [Smith, 2005a] (alphabetic already does this by default).

henrique
  • 6,616
ph4nt0m
  • 1,305
  • 1
    That looks much more like an author-year style to me, only with square brackets. Have you tried that? Have you looked at this answer for changing the bracket shape (http://tex.stackexchange.com/questions/16765/biblatex-author-year-square-brackets)? – Paul Stanley Aug 26 '12 at 14:46
  • I already tried that, but the format of the bibliography entries is nearly exactly what I want when I use "alphabetic", whereas "authoryear" would need to be modified in this regard as well. I just thought it would be easier to choose the style that comes closest to my requirements in order to modify as little as possible :). – ph4nt0m Aug 26 '12 at 15:43
  • Welcome to TeX.sx! It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting. – henrique Sep 20 '12 at 20:54

1 Answers1

25

With biblatex 2+ and biber 1+ you can customize alphabetic labels with \DeclareLabelalphaTemplate. Here's an example.

\documentclass{article}
\usepackage[style=alphabetic,maxalphanames=1]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewcommand*{\labelalphaothers}{}

\DeclareLabelalphaTemplate{ \labelelement{ \field[final]{shorthand} \field{labelname} \field{label} } \labelelement{ \literal{,\addhighpenspace} } \labelelement{ \field{year} } }

\begin{document} \cite{knuth:ct:a,knuth:ct:b,knuth:ct:c,baez/article,baez/online} \printbibliography \end{document}

enter image description here

A couple notes:

  • The argument to \literal should be defined globally. Typically we specify one or more characters. We can also use biblatex's whitespace commands. Unlike biblatex's punctuation commands (e.g. \addcomma), they aren't restricted to citations and bibliographies.

  • Similar results could be obtained with BibTeX by modifying an author-year style (e.g. Bibliography styles like authordate2 in biblatex or natbib?), but getting the right item label alignment in the bibliography isn't easy.

Audrey
  • 28,881