# Biblatex alphabetic style like [Smith, 2005]

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).

-
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 (tex.stackexchange.com/questions/16765/…)? –  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

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}

\renewcommand*{\labelalphaothers}{}

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

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


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.

-
Fantastic, that's exactly what I wanted. Thank you very much :-). –  ph4nt0m Aug 26 '12 at 17:01
@ph4nt0m don't forget to upvote Audrey's answer using the up arrow- this gives her 10 reputation points –  cmhughes Aug 26 '12 at 17:09
I would love to do this, but "Vote Up requires 15 reputation" :-( –  ph4nt0m Aug 26 '12 at 17:48