[Tex/LaTex] How to get the style alpha.bst sorted as plain.bst in Bibtex

bibliographiesbibtexsorting

I like alphanumerical citations written as in alpha.bst style, with initials of authors and years, but I would like references to appear sorted as in plain.bst style. As an example, I prefer the order

[BN07] M. Baker and S. Norine (2007)…
[Blo07] S. Bloch (2007)…

to

[Blo07] S. Bloch (2007)…
[BN07] M. Baker and S. Norine (2007)…

Then I would like to know how to modify the *.bst file in order to get what I want.

Best Answer

EDITED: You could try the following: copy alpha.bst to your tex directory and rename it e.g. to alpha_plsort.bst (you can find the location of the bst files with kpsewhich <bst-file>). In this file locate the definition of the function presort and rename it to presort.alpha. Now open plain.bst, copy the presort function from there, paste it into alpha_plsort.bst and rename it to presort.plain. Then change the call ITERATE(presort) to ITERATE(presort.plain) and insert ITERATE(presort.alpha) after the call to the SORT function. Your new bst file should look now something like this:

FUNCTION {presort.plain}
{ 
    % presort from plain.bst
}

FUNCTION {presort.alpha}
{ 
    % presort from alpha.bst
}

ITERATE {presort.plain}

SORT

ITERATE {presort.alpha}