BibTeX.jl
BibTeX.parse_bibtex
— Method.parse_bibtex(text)
This is a simple input parser for BibTex. I had trouble finding a standard specification, but I've included several features of real BibTex. Returns a preamble (or an empty string) and a dict of dicts.
julia> using BibTeX
+Home · BibTeX.jl
BibTeX.jl
BibTeX.Citation
— Type.Citation{S}(data::Dict{String,String})
A bibliography item in a bibTeX database, based on a dictionary of strings to values. It is parameterized by a symbol S
giving the type of the item (:article
etcetera). A b::Citation
supports b[key]
access to retrieve the data and in general acts like a dictionary from String
to String
.
source
BibTeX.Bibliography
— Method.Bibliography(bibtex::String)
+Bibliography(io::IO)
Given a string (or IO stream) of bibtex-format bibliography data, parses the data and returns a Dict
-like object b::Bibliography
that behaves as a dictionary mapping strings to bibliography items Citation
.
source
BibTeX.parse_bibtex
— Method.parse_bibtex(text)
This is a simple input parser for BibTex. I had trouble finding a standard specification, but I've included several features of real BibTex. Returns a preamble (or an empty string) and a dict of dicts.
julia> using BibTeX: parse_bibtex
julia> preamble, result = parse_bibtex("""
@preamble{some instructions}
@@ -15,7 +16,7 @@ julia> preamble, result = parse_bibtex("""
julia> preamble
"some instructions"
-julia> result["b"]["type"]
+julia> result["b"]["__type__"]
"a"
julia> result["b"]["c"]
@@ -33,4 +34,4 @@ ERROR: Expected { on line 1
julia> parse_bibtex("@book@")
ERROR: Expected { on line 1
-[...]
source
+[...]