[Tex/LaTex] How to sort in-text citations by year, but bibliography by name

biberbibliographiessorting

I am writing a document using the memoir class, pdflatex and biber. Now both my Bibliography at the end of the document and the citations in the text sort alphabetically, but I would like the citations to sort by year. How can i achieve this?

In my preamble I have this:

\usepackage[style=authoryear,backend=biber]{biblatex}%
\renewcommand*{\nameyeardelim}{\addcomma\space}

and I have made a config file that looks like this:

\ExecuteBibliographyOptions{dashed=false, block=space, firstinits, maxcitenames=2,maxbibnames=99, sortcites, sorting=nyt, uniquelist=false}
\DeclareFieldFormat[article]{title}{#1\isdot}
\DeclareFieldFormat[incollection]{title}{#1\isdot}
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareNameAlias{sortname}{last-first}
\renewbibmacro{in:}{}

\renewbibmacro*{volume+number+eid}{
\printfield{volume}
\setunit*{\addnbthinspace}
\printfield{number}
\setunit{\addcomma\space}
\printfield{eid}}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

As far as I understand the sorting option does half the trick as it changes both bib and cite order. Suggestions?

Best Answer

This is an answer for a now very outdated version of biblatex. For more recent versions please refer to Biblatex: how to automatically sort citation by year (sortcites=ynt) when references are sorted by name (sorting=nyt).

biblatex's sorting option can be applied globally (that is in the package loading options, or via \ExecuteBibliographyOptions). The global sorting scheme is then used to sort citations - if sortcites is used - , it is furthermore employed to sort all bibliographies and lists of shorthands printed via \printbibliography or \printshorthands.

If you want to sort a bibliography using a different sorting scheme than the global one, you can specify that sorting scheme in the optional argument to \printbibliography: \printbibliography[sorting=nty].

In your case, you would probably want the global sorting scheme sorting=ynt, so load biblatex with \usepackage[sorting=ynt]{biblatex}, or \ExecuteBibliographyOptions{sorting=ynt}. Your bibliography sorting scheme would be sorting=nty, so you print your bibliography via \printbibliography[sorting=nty].