This class represents a bibliography, usually a single BibTeX file.

This is the same class as BibTeX::Bibliography from bibtex-ruby. See those class docs for more information.

Public Instance methods

all_values (field)

Returns a list of all values of the specified field type, across all entries in the bibliography

This generalizes the names method to arbitrary field types

Ex: #all_values(:year)

--> list of all years that appear in the bibliography
def all_values(field)
                              return map { |e| e[field] }.flatten.compact.map { |v| v.to_s }.sort.uniq
                            end

sort (*arguments, &block)

Returns a list of all of the Entries in this bibliography, sorted by in the specified order. Fixes a problem with bibtex-ruby.

def sort(*arguments, &block)
                              data.sort(*arguments, &block)
                            end

sort_by (*arguments, &block)

Returns a list of all of the Entries in this bibliography, sorted by calling the given block. Fixes a problem with the #sort_by method in the bibtex-ruby version of this class.

def sort_by(*arguments, &block)
                              data.sort_by(*arguments, &block)
                            end