diff --git a/latest/index.html b/latest/index.html index bcc7c59..3604f3e 100644 --- a/latest/index.html +++ b/latest/index.html @@ -1,6 +1,6 @@ -Home · BibTeX.jl

Home

BibTeX.jl

BibTeX.CitationType.
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
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
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
+Home · BibTeX.jl

Home

BibTeX.jl

BibTeX.CitationType.
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
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
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}
@@ -51,4 +51,4 @@ julia> parse_bibtex("""
                 title = B}
         """)
 ERROR: Duplicated field title on line 3
-[...]
source

+[...]
source
search_latexdirective(string, istart=1, inbrace=false)

Search for a LaTeX directive \directive{arg} or similar in string, returning (ds, de, ae) such that string[ds:de] gives \directive and string[de+1:ae] gives {arg}. Use striparg to remove surrounding braces and whitespace from the arg.

source
BibTeX.simplify_latexFunction.
simplify_latex(s::AbstractString, extra_directives=BibTeX.text_directives)

Simplify a LaTeX string s into "plain text" if possible, stripping/converting known LaTeX directives in favor of e.g Unicode.

extra_directives is a dictionary (String=>String) that maps LaTeX directives to replacements. It defaults to BibTeX.text_directives, which simply strips out things like bold and italics. Alternatively, you can pass BibTeX.md_directives, which uses Markdown syntax for such directives.

source
BibTeX.stripargFunction.
striparg(s, argstart=start(s), argend=endof(s))

Return the substring of s corresponding to the argument from argstart:argend, stripping leading/trailing whitespace and braces.

source
diff --git a/latest/search_index.js b/latest/search_index.js index 3f74484..3a8db91 100644 --- a/latest/search_index.js +++ b/latest/search_index.js @@ -32,6 +32,30 @@ var documenterSearchIndex = {"docs": [ "text": "parse_bibtex(text)\n\nThis 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.\n\njulia> using BibTeX: parse_bibtex\n\njulia> preamble, result = parse_bibtex(\"\"\"\n @preamble{some instructions}\n @comment blah blah\n @string{short = long}\n @a{b,\n c = {{c} c},\n d = \"d {\"} d\",\n e = f # short\n }\n \"\"\");\n\njulia> preamble\n\"some instructions\"\n\njulia> result[\"b\"][\"__type__\"]\n\"a\"\n\njulia> result[\"b\"][\"c\"]\n\"{c} c\"\n\njulia> result[\"b\"][\"d\"]\n\"d {\\\"} d\"\n\njulia> result[\"b\"][\"e\"]\n\"f short\"\n\njulia> parse_bibtex(\"@book\")\nERROR: Expected { on line 1\n[...]\n\njulia> parse_bibtex(\"@book@\")\nERROR: Expected { on line 1\n[...]\n\nRepeated fields and keys are not allowed:\n\njulia> using BibTeX: parse_bibtex\n\njulia> parse_bibtex(\"\"\"\n @book{abook,\n title = A}\n @book{abook,\n title = B}\n \"\"\")\nERROR: Duplicated id abook on line 3\n[...]\n\njulia> parse_bibtex(\"\"\"\n @book{abook,\n title = A,\n title = B}\n \"\"\")\nERROR: Duplicated field title on line 3\n[...]\n\n\n\n" }, +{ + "location": "index.html#BibTeX.search_latexdirective", + "page": "Home", + "title": "BibTeX.search_latexdirective", + "category": "Function", + "text": "search_latexdirective(string, istart=1, inbrace=false)\n\nSearch for a LaTeX directive \\directive{arg} or similar in string, returning (ds, de, ae) such that string[ds:de] gives \\directive and string[de+1:ae] gives {arg}. Use striparg to remove surrounding braces and whitespace from the arg.\n\n\n\n" +}, + +{ + "location": "index.html#BibTeX.simplify_latex", + "page": "Home", + "title": "BibTeX.simplify_latex", + "category": "Function", + "text": "simplify_latex(s::AbstractString, extra_directives=BibTeX.text_directives)\n\nSimplify a LaTeX string s into \"plain text\" if possible, stripping/converting known LaTeX directives in favor of e.g Unicode.\n\nextra_directives is a dictionary (String=>String) that maps LaTeX directives to replacements. It defaults to BibTeX.text_directives, which simply strips out things like bold and italics. Alternatively, you can pass BibTeX.md_directives, which uses Markdown syntax for such directives.\n\n\n\n" +}, + +{ + "location": "index.html#BibTeX.striparg", + "page": "Home", + "title": "BibTeX.striparg", + "category": "Function", + "text": "striparg(s, argstart=start(s), argend=endof(s))\n\nReturn the substring of s corresponding to the argument from argstart:argend, stripping leading/trailing whitespace and braces.\n\n\n\n" +}, + { "location": "index.html#BibTeX.jl-1", "page": "Home",