Bibliography.jl

Bibliography.sorting_rulesConstant
const sorting_rules = Dict{Symbol, Vector{Symbol}}(
				:nty  => [:authors; :title; :date],
				:nyt  => [:authors; :date; :title],
				:nety => [:authors; :editors; :title; :date],
				:neyt => [:authors; :editors; :date; :title],

:y => [:date], );

Implemented sorting rules for bibliography entry sorting.

See also sort_bibliography!.

source
Bibliography.export_cffMethod
export_cff(e::Entry, destination::String="CITATION.cff", version::String="1.2.0", add_preferred::Bool=true) -> Dict{String, Any}

Export an Entry to a CFF file (default is CITATION.cff).

source
Bibliography.fileio_loadMethod
fileio_load(file; check)
fileio_load(stream; check)

The FileIO interface to import a BibTeX file or parse a BibTeX string and convert it to the internal bibliography format. The check keyword argument can be set to :none (or nothing), :warn, or :error to raise appropriate logs.

source
Bibliography.fileio_saveMethod
fileio_save(file, data)
fileio_save(stream, data)

Export a bibliography as a BibTeX string to a file or stream.

source
Bibliography.import_bibtexMethod
import_bibtex(input; check = :error)

Import a BibTeX file or parse a BibTeX string and convert it to the internal bibliography format. The check keyword argument can be set to :none (or nothing), :warn, or :error to raise appropriate logs.

source
Bibliography.in_to_bibtex!Method
in_to_bibtex!(fields::BibInternal.Fields, i::BibInternal.In)

Convert the "published in" information to a BibTeX string.

source
Bibliography.recursive_islessFunction
recursive_isless(a::Entry, b::Entry, fields::Tuple{Symbol},
                 depth::Int = 0)

Helper function for sort_bibliography!.

This function allows recursive checking if a < b with descending importance. The importance set for the comparison is defined by the argument fields. This argument is a tuple consisting of symbols denoting the fields of the data type BibInternal.Entry. The ordering implies the importance.

The depth argument is purely for iterating/recursive purposes.

source
Bibliography.selectMethod
select(
    bibliography::DataStructures.OrderedDict{String,Entry},
    selection::Vector{String};
    complementary::Bool = false
    )

Select a part of a bibliography based on a given selection set of keys. If complementary is true, selection designates which entries will not be kept. By default, complementary is set to false.

source
Bibliography.sort_bibliography!Function
sort_bibliography!(
    bibliography::DataStructures.OrderedDict{String,Entry},
    sorting_rule::Symbol = :key
    )

Sorts the bibliography in place.

The sorting order can be set by specifying the sorting_rule. The sorting is implemented via isless() functions. For detailed insight have a look at the isless() implementation of Julia and BibInternal.jl.

Supported symbols for sorting_rule are:

  • :key (default): sort by bibliography keys e.g. BibTeX keys or :id
  • the sorting rules defined in sorting_rules
Note:

The sorting is not following explicitly bibliographic alphabetizing conventions. It follows standard comparator behaviour implied by the implemented isless() functions (string comparators).

source
Bibliography.xnamesFunction
xnames(entry, editors = false; names = :full)

Format the name of an Entry for web export.

Arguments:

  • entry: an entry
  • editors: true if the name describes editors
  • names: :full (full names) or :last (last names + first name abbreviation)
source