Many thx to Mico! \noopsort
did the job!
made just the follwing changes in the .bib-file:
@PREAMBLE{ {\providecommand{\noopsort}[1]{}}
@ARTICLE{Peterson2013b,
author = {Peterson, A. and {\noopsort{b}}Meier, B. and Kensington, U},
title = {Second listed reference},
year = {2013},
owner = {robert},
timestamp = {2013.07.17}
}
@ARTICLE{Peterson2013a,
author = {Peterson, A. and {\noopsort{a}}Umber, B. and Kensington, U},
title = {First listed reference},
year = {2013},
owner = {robert},
timestamp = {2013.07.17}
}
How I commented in your question I see two possibilities for sorting the bibliographies entries:
The first: Using only the Last Name of the First Author
How you are using biber
, you are able to use labelalpha
(biblatex.pdf. page 59). Using labelalpha
you can use only one author, with the maxalphanames
. Then if it is set to 1
biber only use the first author (really the lastname) for make the labelalpha
. Finally, it is necessary to specify a sorting scheme that use labelalpha
for example anyt
(Page 254, biblatex.pdf). Then load biblatex
whith:
\usepackage[maxalphanames=1,labelalpha,maxbibnames=99, sorting=anyt, style=authoryear, natbib=true, backend=biber]{biblatex}
MWE
\documentclass{article}
\begin{filecontents}{MWE.bib}
@article{A2014,
author={A,B and C,D},
title={Test},
year = {2014}
}
@article{A2000,
author={A,B and D,E},
title={Test},
year = {2000}
}
\end{filecontents}
\usepackage[maxalphanames=1,labelalpha,maxbibnames=99, sorting=anyt, style=authoryear, natbib=true, backend=biber]{biblatex}
\addbibresource{MWE.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
The maxbibanames=99
is for printed the full authors in the bibliography.
The second: Using the fullname of the First Author
This is possible using DeclareStyleSourcemap
. The most the default alphabetic sorting schemes of biblatex
are able to use sortname
field. Then it is possible use DeclareStyleSourcemap
for copy the fullname of the first author in the sortname
field. For a explains about Regular Expressions
read the perl
documentation here.
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author, match=\regexp{(.+)\sand}, final]
\step[fieldset=sortname, fieldvalue=$1, final] }
}}
MWE
\documentclass{article}
\begin{filecontents}{MWE.bib}
@article{A2014,
author={A,Bo and M,M},
title={Test},
year = {2014}
}
@article{A2000,
author={A,Co and D,E},
title={Test},
year = {2000}
}
\end{filecontents}
\RequirePackage[maxbibnames=99, sorting=nyt, style=authoryear, backend=biber]{biblatex}
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author, match=\regexp{(.+)\sand}, final]
\step[fieldset=sortname, fieldvalue=$1, final] }
}}
\addbibresource{MWE.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Best Answer
I can't remember the logic with complete certainty, but I think you've found the right function to edit. The
.bst
syntax is slightly ... odd, but the key couple of lines inplain.bst
are:(this is from
plain.bst
– many other.bst
files are derived from this). I suspect that, as a quick hack, if you were to replace that first line withthen the function would go round the loop only once, and so would add only a single name to the sort key, which would get the effect you're looking for.
To give you an idea of what's going on, the way that BibTeX works here is that:
The
ITERATE {presort}
call iterates through all of the entries that are to be processed, calling thepresort
function on each. Thepresort
function, you'll see, defines the magic valuesort.key$
for each entry.The
SORT
call sorts all the entries in alphabetical order of theirsort.key$
.The
ITERATE
function (which is called twice afterSORT
, inplain.bst
) then runs through each of the entries again, this time in their sorted order. TheITERATE{call.type$}
call is what actually writes out the.bbl
file, since it calls the functionarticle
, orinproceedings
, or whatever, as appropriate.The authoritative documentation for this is in the file
btxhak.pdf
, which might be on your system already, or which you can find at CTAN.