1

I am using biblatex for my academic CV as follows:

\usepackage[sorting=debug,maxbibnames=99]{biblatex}
\bibliography{../bibs/publications}

...

\nocite{*}
\printbibliography

As you can tell, I am using the sort=debug option in to control which order the biblatex entries get printed. However, this requires that I pick my key names in ../bibs/publications.bib to reflect the desired order; e.g.:

 @article {1_somearticle,
   ...
 }

 @article {2_somearticle,
   ...
 }

Obviously, this is rather tedious to update when I want to add a new work. Is there a way to get biblatex to print the bibliography entries in the order they are listed in the bibtex file?

  • sorting=none and \nocite{somekey,otherkey,differentkey} should I think print in order of the appearance in \nocite. Would I think be easier to update. Or could you just sort the bibliography by year? Maybe this answer. – Dai Bowen Sep 15 '16 at 16:43
  • 1
    The idea is that biblatex does the sorting for you - always. Is there any sense to the ordering in the .bib file? It would be no trouble sorting by full date, ... I'm assuming here that the ordering in the CV is not supposed to be random. – moewe Sep 15 '16 at 17:02
  • @DaiBowen: this produces empty output –  Sep 15 '16 at 18:37
  • @moewe: multiple papers per year dictates that I would like to put the most recent one at the top; I'm also not a huge fan of putting in more detailed information beyond year. –  Sep 15 '16 at 18:37
  • 1
    Well, you can of course add manual information like sortyear to have more fine-grained control over the sorting "within" one year. Needless to say that even if you give the full date (why would you not be a fan?) there is no need that the output show the full year. – moewe Sep 15 '16 at 18:46
  • 1
    What exactly is the "algorithm" by which you want to sort? If it isn't to far off anything normal, I'm sure it can be implemented in biblatex without too much work (if your .bib file gives the needed information that is, but that should not be too hard to manage - manually ordering the .bib file sounds worse). – moewe Sep 15 '16 at 18:47
  • @moewe: I guess I wouldn't want to go through the extra work of putting in additional date details every time I add to the bibtex. It could be dummy data, but then my OCD/pedantry kicks in (i.e., I'd prefer a cleaner solution). Ideally I would like to manually order the .bib file) –  Sep 15 '16 at 18:54
  • Well, I wouldn't be trying to steer you to another solution if sorting "by .bib file" was possible. As far as I know it isn't. Of course you can try and write a script that numbers your references in the .bib correctly (I couldn't, but it should be possible). You can of course also ask the Biber maintainer to include that feature - it probably wouldn't be very high up the list, but if it easy enough (not exactly sure), he might go for it. ... – moewe Sep 15 '16 at 19:00
  • 4
    ... Frankly though, I believe adding the full date, that is writing date = {2016-07-08} instead of year = {2016}, is less awkward than manually sorting things in the .bib. And only marginally more work. – moewe Sep 15 '16 at 19:01
  • @moewe: thanks! Perhaps I will just do that. –  Sep 15 '16 at 19:11
  • 1
    If you have found an answer that works for you, please do not hesitate to post a self-answer in case others have the same problem. – moewe Sep 15 '16 at 19:12

1 Answers1

3

The order of entries in the .bib file is currently not something Biber can sort by. The information could probably be accessed easily, but there is no interface for it right now.

In a way sorting by order of entries in the .bib goes against the spirit of Biber/BibTeX. The idea is that the backend sorts your bibliography by some meaningful algorithm (cite order, values of fields, ...) instead of relying on you to sort the .bib file.

In your case where you want to sort by year and have multiple works from the same year you can either use the sortyear field to control the order (sortyear = {2016-1}, sortyear = {2016-2}) or you give more detailed publication dates date = {2016-04-23} and sort by full date (see here - you don't even have to print the full date in the document).

I don't believe that the two options of the last paragraph are significantly more work than sorting the references manually in the .bib by moving them around.

moewe
  • 175,683