biber 0.9.4+ supports configurable entry labels. If available, biber reads a new .bcf section "labelalphatemplate" which obviously needs biblatex macro support to define it, like with sorting. There is a default template hard-coded for now which implements the current labelalpha behaviour. It can be specified globally or per-type. Here is a sample .bcf fragment which comes immediately before the inheritance section:
<bcf:labelalphatemplate type="global">
<bcf:labelelement order="1">
<bcf:labelpart final="1">shorthand</bcf:labelpart>
<bcf:labelpart>label</bcf:labelpart>
<bcf:labelpart substring_width="3" substring_side="left" ifnamecount="1">labelname</bcf:labelpart>
<bcf:labelpart substring_width="1" substring_side="left" substring_compound="1">labelname</bcf:labelpart>
</bcf:labelelement>
<bcf:labelelement order="2">
<bcf:labelpart>-</bcf:labelpart>
</bcf:labelelement>
<bcf:labelelement order="3">
<bcf:labelpart substring_width="2" substring_side="right">year</bcf:labelpart>
</bcf:labelelement>
</bcf:labelalphatemplate>
<bcf:labelalphatemplate type="misc">
<bcf:labelelement order="1">
<bcf:labelpart>label</bcf:labelpart>
<bcf:labelpart substring_width="v" substring_width_max="4">labelname</bcf:labelpart>
</bcf:labelelement>
</bcf:labelalphatemplate>
The label is composed of the concatenation of all of the <bcf:labelelement> results, in the order defined by the "order" attribute. Within each <bcf:labelelement>, the first <bcf:labelpart> which returns a non-empty string is used and the rest are skipped. Any <bcf:labelpart> with a "final" attribute set to "1", if it returns a non-empty string, is the final component in the label and processing stops at this point.
"The substring_width" and "substring_side" can be used to limit the part of the field used in the label and work in the same way as with sorting fields. The special "substring_width" value "v" will cause the substring to be the length which disambiguates it from the same substring in all other citekeys in the same section. The length of this dynamic string can be limited by the "substring_width_max" attribute. The "ifnamecount" attribute is a condition on the <bcf:labelpart> which makes the labelpart only apply if the list field in question has the length equal to its value. For name fields, the string used is the lastname. The useprefix option is obeyed and if true and there is a prefix, the first character of the prefix is used in addition to the lastname. By default, for name fields, the number of names considered for the label depends on the name visibility settings, as usual. If the "namecount" option is defined in a <bcf:labelpart> however, this value overrides these options and only "namecount" names are used.
The attribute "substring_compound", if set to true, will cause the substring to be taken from all parts of a compound string. A compound string is one which contains spaces. So, with this attribute set to "1", the string "Ballam Forsyth" (assuming a 1 character, left-side substring) will become "BF" instead of just "B" which it would be without this attribute. This is to allow more flexibility when taking substrings of compound names.
The value of a <bcf:labelpart> can be one of the supported fields or a literal string to insert into the label. If the value is not a valid field for labels, it is inserted as a literal string. Valid standard fields are all name fields (including labelname), all date part fields (including labelyear), "label" and "shorthand".
Here are some examples and more detailed explanations of labelpart specifications:
<bcf:labelpart final="1">shorthand</bcf:labelpart>
If the "shorthand" field is defined, then this is the complete label due to the "final" attribute
<bcf:labelpart substring_width="3" substring_side="left" ifnamecount="1">labelname</bcf:labelpart>
If the labelname name list is only one name in length (ifnamecount="1") then use the first 3 characters from the left side of the labelname.
<bcf:labelpart substring_width="v" substring_width_max="4">labelname</bcf:labelpart>
For each name in the labelname, up to maxnames/minnames/uniquelist, use as many characters as necessary in order to disambiguate from all other lastnames in the section, up to maximum of 4 characters.
<bcf:labelpart>-</bcf:labelpart>
Insert the literal string "-" at this point in the label.
<bcf:labelpart substring_width="vf" substring_fixed_threshold="2">labelname</bcf:labelpart>
As "substring_width="v"" but this will extend the width of disambiguated strings to be the same length as the longest disambiguated string, as long as this length is reached at least "substring_fixed_threshold" times (default 1) by some string. This can be used to regularise the string format to some extent.
<bcf:labelpart substring_width="l">labelname</bcf:labelpart>
Alternative method of disambiguation via string widths where the guarantee is that the whole list of names in the labelpart will be unambiguous. The individual string parts corresponding to individual names will not necessarily be disambiguated from each other, only the list as a whole is disambiguated. For example, with "v" disambiguation for the labelname, the labelname part of the label would be:
Agassi, Chang, Laver -> [AChLa]
Agassi, Connors, Lendl -> [AConLe]
Agassi, Courier, Laver -> [ACouLa]
Borg, Connors, Edberg -> [BConEd]
Borg, Connors, Emerson -> [BConEm]
With "vf" disambiguation, it would be:
Agassi, Chang, Laver -> [AChaLa]
Agassi, Connors, Lendl -> [AConLe]
Agassi, Courier, Laver -> [ACouLa]
Borg, Connors, Edberg -> [BConEd]
Borg, Connors, Emerson -> [BConEm]
With "l" disambiguation, it would be:
Agassi, Chang, Laver -> [AChL]
Agassi, Connors, Lendl -> [AConL]
Agassi, Courier, Laver -> [ACouL]
Borg, Connors, Edberg -> [BCEd]
Borg, Connors, Emerson -> [BCEm]
This is the current biber hard-coded internal setting which implements the current biblatex labelalpha=true behaviour:
<bcf:labelalphatemplate type="global">
<bcf:labelelement order="1">
<bcf:labelpart final="1">shorthand</bcf:labelpart>
<bcf:labelpart>label</bcf:labelpart>
<bcf:labelpart substring_width="3" substring_side="left" ifnamecount="1">labelname</bcf:labelpart>
<bcf:labelpart substring_width="1" substring_side="left">labelname</bcf:labelpart>
</bcf:labelelement>
<bcf:labelelement order="2">
<bcf:labelpart substring_width="2" substring_side="right">year</bcf:labelpart>
</bcf:labelelement>
</bcf:labelalphatemplate>
It differs very slightly from the bibtex output for labelalpha=true as with bibtex, a name prefix, if specified, shortens the characters of the lastname to 2 when there is only one name. There is no point in such behaviour any more and it massively complicates the user interface if we need such special cases. All this means is that with biber, under the current static labelalpha settings, "van Rompel" gives "vRom" instead of "vRo".
When the biblatex interface is implented, then a global labelalphatemplate section as per the above in the .bcf will be mandatory.