Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Biblatex/biber citation sorting: ynt bibliography sorting: nyt

Citation1 - Appeared first in 2010 Darwin et al (2010):

Citation2 - Appeared second in 2010 Darwin et al (2010)

When cited, the first one appears as: Darwin et al (2010b) and the second one as Darwin et al (2010a). Is this happening because the sorting is also being done on second and third authors? Is there any way to swap the a,b designations?

share|improve this question
    
Please post a complete MWE (minimum working example) of what you're looking to achieve, including the two Darwin entries. Without this information, it's going to be nearly impossible to diagnose the problem. –  Mico Mar 20 '13 at 0:46
4  
It is possible to add sortkey, sortname and sortitle fields in your bib entries to manually modify the sorting order to fit your needs. –  Guido Mar 20 '13 at 1:31
    
@Guide Thanks. I added sortkey={first author name} to both bib items and that did the trick. I still wonder how it knows which one should be a and which one b. –  cryptic0 Mar 20 '13 at 2:45
add comment

2 Answers 2

This is almost certainly to do with the title sorting (the "t" in the sorting name). I assume that the name list for both citations is the same, hence the automatic "et al" truncation after the first name. You can always, if you want, make a custom sorting specification like:

\DeclareSortingScheme{ynct}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortyear}
    \field{year}
    \literal{9999}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{\citeorder}
  \sort{
    \field{sorttitle}
    \field{title}
  }
}

Here I've just modified the defauly ynt scheme to add a sort on citation order before title - perhaps that's what you would like? You can find all of the default sorting schemes for cut and paste into your document in the biblatex.def file that comes with biblatex.

share|improve this answer
    
Thanks for your input. Note however that co-author names are different between the two references (see the title), which is why the problem existed in the first place. –  cryptic0 Mar 20 '13 at 14:43
    
Ah, yes. In that case, you could adjust maxnames/minnames which also impacts how many names the sorting algorithm sees. –  PLK Mar 20 '13 at 21:09
add comment

I solved the very same issue by automatically filling the "sortname" field (originally from biblatex documentation):

\DeclareSourcemap{
\maps[datatype=bibtex]{
    \map[overwrite=false]{
        \step[fieldsource=author]
        \step[fieldset=sortname, origfieldval, final]
        \step[fieldsource=sortname, match=\regexp{\A(.+?)\s+and.*}, replace={$1}]
    }
}
}

Citations should be sorted first by year and month, then by authors, so that extrayear indicators (a,b,...) get assigned in the right way. This sorting scheme can be globally set with the package option sorting=ymnt

\DeclareSortingScheme{ymnt}{
\sort{
    \field{presort}
}
\sort[final]{
    \field{sortkey}
}
\sort{
    \field{sortyear}
    \field{year}
    \literal{9999}
}
\sort{
    \field{month}
}
\sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
}
}

In bibliographies I wanted to get the entries sorted by first author, then year and month, finally by all authors and title instead of the "normal" nyt style of author sorting which would then lead to shuffling the extrayear indicators. So I'm overwriting the global sort setting with sorting=symnt and use the following sorting scheme which splits sortname apart from the remaining author block:

\DeclareSortingScheme{symnt}{
\sort{
    \field{presort}
}
\sort[final]{
    \field{sortkey}
}
\sort{
    \field{sortname}
}
\sort{
    \field{sortyear}
    \field{year}
    \literal{9999}
}
\sort{
    \field{month}
}
\sort{
    \field{author}
    \field{extrayear}
    \field{editor}
    \field{translator}
}
\sort{
    \field{sorttitle}
    \field{title}
}
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.