1

I'm trying to sort some tech report citations from the same year in the bibliography by report issue number, but have got no chance so far, i've even tried adding the month in order to make them sort chronologically but it does not have any effect.

myreferences.bib

@techreport{VanBuskirk2014a,
address = {Sydney},
author = {{Van Buskirk}, Joe and Roxburgh, Amanda and Bruno, Raimondo and Burns, Lucinda},
institution = {National Drug and Alcohol Research Centre},
month = {mar},
number = {2},
pages = {1--14},
title = {{Drugs and The Internet}},
year = {2014}
}

@techreport{VanBuskirk2014b,
address = {Sydney},
author = {{Van Buskirk}, Joe and Roxburgh, Amanda and Bruno, Raimondo and Burns, Lucinda},
institution = {National Drug and Alcohol Research Centre},
month = {sep},
number = {3},
pages = {1--5},
title = {{Drugs and The Internet}},
year = {2014}
}

As i cite the VanBuskirk2014b before the VanBuskirk2014a it's ordered and numbered the wrong way, the september report gets the "a" key and is before in the bibliography whereas the march report gets the "b" key and goes after in the bibliography.

Here a reduced version to illustrate the problem:

test.tex

\documentclass[12pt,a4paper,twoside]{report}
\usepackage[bindingoffset=0.5cm, left=3cm, right=3cm, top=2.5cm, bottom=2.5cm]{geometry}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{csquotes}
\usepackage[backend=biber, style=apa, sortcites=true]{biblatex}
\DeclareLanguageMapping{french}{french-apa}
\setlength\bibitemsep{1.5\itemsep}

\addbibresource{myreferences.bib}

\begin{document}

    \autocite{VanBuskirk2014b}\\

    \autocite{VanBuskirk2014a}

    \printbibliography

\end{document}
  • Adding the month doesn't help as all the standard sort schemes only consider the year when sorting, see biblatex sorting by date for sorting by the entire date. – moewe May 6 '16 at 15:17
3

You can use the sortyear field to control the sorting manually, use it as sortyear = {<year>-<number>}

@techreport{VanBuskirk2014a,
  address = {Sydney},
  author = {{Van Buskirk}, Joe and Roxburgh, Amanda and Bruno, Raimondo and Burns, Lucinda},
  institution = {National Drug and Alcohol Research Centre},
  month = {mar},
  number = {2},
  pages = {1--14},
  title = {{Drugs and The Internet}},
  year = {2014},
  sortyear = {2014-2},
}

@techreport{VanBuskirk2014b,
  address = {Sydney},
  author = {{Van Buskirk}, Joe and Roxburgh, Amanda and Bruno, Raimondo and Burns, Lucinda},
  institution = {National Drug and Alcohol Research Centre},
  month = {sep},
  number = {3},
  pages = {1--5},
  title = {{Drugs and The Internet}},
  year = {2014},
  sortyear = {2014-3},
}

Technically, we could really sort by number as well, but since there is no way to restrict sorting to one type (see the recent Different sorting schemes for different entry types? and how to adapt the sorting of a custom type @standard in using biblatex/biber) that could mess up the sorting for other types that use number.

This is a version of the standard nyvt sorting, where the volume is also considered.

\DeclareSortingScheme{nynot}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field[padside=left,padwidth=4,padchar=0]{number}
    \literal{0000}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
}
  • Hi, would you mind taking a look at this? You have far more experience with biblatex than me, and even i can see, that this is Bäh. I would hate if that gets distributed even further. Thanks. – Johannes_B May 10 '16 at 5:05
  • @Johannes_B First off, the call to biblatex contains quite a few options, seeing that the drivers are rewritten from scratch et least the doi, isbn, url and eprint options are practically useless. The comment for the backref option is wrong (of course backref=false turns backrefs off). The \AtBeginEnvironment{thebibliography} block looks a bit fishy to me, but I don't know about that (I wouldn't change penalties unless I have to). The \DeclareFieldFormats could be combined into one \DeclareFieldFormat*{title}{#1\par} and I'm not too fond of the \par in there. – moewe May 10 '16 at 5:14
  • ... (cont'd) The newly rewritten drivers are of course much simpler than the standard drivers. I don't like the \pars and the font commands, but OK. The \par\vspace{0.3\baselineskip} at the end looks fishy, one could better use \bibitemsep or similar for that. The \DeclareNameFormat{author} will of course explode with biblatex >= 3.3. The use of refsections for type filtering is also a bit naff, one could just use the same refsection everywhere and type=... in the option to \printbibliography. – moewe May 10 '16 at 5:19
  • It all started with a I want to have the bibliography match the CV issue. Can you leave a comment on github directly? – Johannes_B May 10 '16 at 5:19
  • The original friggery-cv template already went havoc :-) I said i'll fix when 3.4 is around. – Johannes_B May 10 '16 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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