5

NOT using biblatex, I want my bibliography sorted in chronological order.

Why do I want that? Mainly because I think that way the bibliography not only serve as a "repository" for the references, but it also shows the progression of the literature on the topic.

I have searched the web, but mainly ended up with in-text sorting only, or not working modification of the bibtex style bst file.

2
  • How large is your bibliography: A few dozen entries, or several hundred? Separately, how are entries with the same year supposed to be sorted -- alphabetically by author, or by some other criterion?
    – Mico
    Commented Jan 16, 2015 at 22:26
  • ~hundred. for same-year entries, the inner sorting is less important, I left it to an alphabetical order (that's the role of year.author.sort).
    – luneart
    Commented Jan 17, 2015 at 11:05

2 Answers 2

3

I came up with a small set of modifications for a bst file. I only tested it with author-year style, francaissc.bst.

Basically, the presort function must be altered.

Without entering in too much details about the bst files, there is one thing to understand for making those modifications: the .sort are functions, that must be defined, for example author.editor.sort is most likely already defined in an author-year style.

Hence, first thing to do is to add those functions:

FUNCTION {year.author.sort}
{ year empty$
    { author empty$
        { key empty$
            { "to sort, need year, author, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { author sort.format.names }
      if$
    }
    { year sort.format.names }
  if$
}
FUNCTION {year.sort}
{ year empty$
    { key empty$
        { "to sort, need year or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { year sort.format.names }
  if$
}

They are very simple because they rely on stuff already defined in there, mostly the sort.format.names function.

Then, you must modify the presort function itself. Basically, change author to year, but I let be the judge of what you actually want to change. In my case I now have (a commented line is the previous content, with the new one next line):

FUNCTION {presort}
{ calc.label
  label sortify
  "    "
  *
  type$ "book" =
  type$ "inbook" =
  or
%    'author.editor.sort
     'year.author.sort
    { type$ "proceedings" =
%        'editor.sort
%        'author.sort
        'author.sort
        'year.sort
      if$
    }
  if$
  #1 entry.max$ substring$
  'sort.label :=
  sort.label
  *
  "    "
  *
%  title field.or.null
  year field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

And for an added bonus, with the 'sort' option of the natbib package, the in-text references are now also ordered chronologically, because the main bibliography is.

1

The package multibibliography http://www.ctan.org/pkg/multibibliography includes the creation of a chronlogically ordered reference list. You probably can use just the Perl script to create the timeline reference list.

Right now Michael Cohen and I work on the refactored version of the package which will include a stand alone chronological bst file.

1
  • it there a way to change the sorting order of an existing bst? because most of the time 1) the style is imposed, 2) one will not be willing to create a full bst and make all the typographic choices.
    – luneart
    Commented Jan 17, 2015 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .