BibInternal.entries
— Constantconst entries = [
:article,
:book,
:booklet,
:inbook,
:incollection,
:inproceedings,
:manual,
:mastersthesis,
:misc,
:phdthesis,
:proceedings,
:techreport,
:unpublished,
]
List of possible entries (currently based on bibtex). Keep it sorted for readability.
BibInternal.fields
— Constantconst fields = [
:address,
:annote,
:archivePrefix,
:author,
:booktitle,
:chapter,
:crossref,
:edition,
:editor,
:eprint,
:howpublished,
:institution,
:journal,
:key,
:month,
:note,
:number,
:organization,
:pages,
:primaryClass,
:publisher,
:school,
:series,
:title,
:type,
:volume,
:year
]
List of possible fields (currently based on bibtex). Keep it sorted for readability
BibInternal.maxfieldlength
— Constantconst maxfieldlength
For output formatting purpose, for instance, export to BibTeX format.
BibInternal.rules
— Constantconst rules = Dict([
"article" => ["author", "journal", "title", "year"]
"book" => [("author", "editor"), "publisher", "title", "year"]
"booklet" => ["title"]
"eprint" => ["author", "eprint", "title", "year"]
"inbook" => [("author", "editor"), ("chapter", "pages"), "publisher", "title", "year"]
"incollection" => ["author", "booktitle", "publisher", "title", "year"]
"inproceedings" => ["author", "booktitle", "title", "year"]
"manual" => ["title"]
"mastersthesis" => ["author", "school", "title", "year"]
"misc" => []
"phdthesis" => ["author", "school", "title", "year"]
"proceedings" => ["title", "year"]
"techreport" => ["author", "institution", "title", "year"]
"unpublished" => ["author", "note", "title"]
])
List of BibTeX rules bases on the entry type. A field value as a singleton represents a required field. A pair of values represents mutually exclusive required fields.
BibInternal.AbstractEntry
— TypeAbstract entry supertype.
BibInternal.Access
— Typestruct Access
doi::String
howpublished::String
url::String
end
Store the online access of an entry as a String. Handles the fields doi
and url
and the arXiv
entries. For additional fields or entries, please fill an issue or make a pull request.
BibInternal.Access
— MethodAccess(fields::Fields)
Construct the online access information based on the entry fields.
BibInternal.Date
— Typestruct Date
day::String
month::String
year::String
end
Store the date information as day
, month
, and year
.
BibInternal.Date
— MethodDate(fields::Fields)
Construct the date information based on the entry fields.
BibInternal.Entry
— Typestruct Entry <: AbstractEntry
access::Access
authors::Names
booktitle::String
date::Date
editors::Names
eprint::Eprint
id::String
in::In
fields::Dict{String,String}
title::String
type::String
end
Generic Entry type. If some construction rules are required, it should be done beforehand. Check bibtex.jl
as the example of rules implementation for BibTeX format.
BibInternal.Entry
— MethodEntry(id::String, fields::Fields)
Construct an entry with a unique id and a list of Fields
.
BibInternal.Eprint
— Typestruct Eprint
archive_prefix::String
eprint::String
primary_class::String
end
Store the information related to arXiv eprint format.
BibInternal.Eprint
— MethodEprint(fields::Fields)
Construct the eprint arXiv information based on the entry fields. Handle old and current arXiv format.
BibInternal.Fields
— TypeFields = Dict{String, String}
. Stores the fields name => value
of an entry.
BibInternal.In
— Typestruct In
address::String
chapter::String
edition::String
institution::String
journal::String
number::String
organization::String
pages::String
publisher::String
school::String
series::String
volume::String
end
Store all the information related to how an entry was published.
BibInternal.In
— MethodIn(fields::Fields)
Construct the information of how an entry was published based on its fields
BibInternal.Name
— MethodName(str::String)
Decompose without ambiguities a name as particle
(optional) last
, junior
(optional), first
middle
(optional) based on BibTeX possible input. As for BibTeX, the decomposition of a name in the form of first
last
is also possible, but ambiguities can occur.
Base.isless
— MethodBase.isless(a::BibInternal.Date,b::BibInternal.Date)::Bool
Function to check for a < b
on BibInternal.Date
data types.
This function will throw an ArgumentError
if the year
can not parsed into Int
. If it is not possible to parse month
or day
to Int
those entries will be silently ignored for comparison. This function will not check if the date fields are given in a correct format all fields are parsed into and compared as Int
(no checking if date format is correct or valid!).
The silent ignoring of not parseable month
or day
fields will lead to misbehaviour if using comparators like ==
or !==
!
Base.isless
— MethodBase.isless(a::BibInternal.Name,b::BibInternal.Name)::Bool
Function to check for a < b
on BibInternal.Name
data types.
This function will check the fields last
, first
and middle
in this order of priority. The other fields are ignored for now. The field comparison is done by string comparison no advanced alphabetizing rules are used for now.
The silent ignoring of the other fields might lead to misbehaviour if using comparators like ==
or !==
!
BibInternal.arxive_url
— Methodarxive_url(fields::Fields)
Make an arxiv url from an eprint entry. Work with both old and current arxiv BibTeX format.
BibInternal.check_entry
— Methodcheck_entry(fields::Fields)
Check the validity of the fields of a BibTeX entry.
BibInternal.erase_spaces
— Methoderase_spaces(str::String)
Erase extra spaces, i.e. r"[ ]+"
, from str
and return a new string.
BibInternal.get_delete!
— Methodget_delete!(fields::Fields, key::String)
Get the value of a field and delete it afterward.
BibInternal.make_bibtex_entry
— Methodmake_bibtex_entry(id::String, fields::Fields)
Make an entry if the entry follows the BibTeX guidelines. Throw an error otherwise.
BibInternal.names
— Methodnames(str::String)
Decompose into parts a list of names in BibTeX compatible format. That is names separated by and
.
BibInternal.space
— Methodspace(field::Symbol)
Return the amount of spaces needed to export entries, for instance to BibTeX format.