New Domains¶
Classes and methods to maintain any bibtex information that is stored outside the doctree.
-
class
sphinxcontrib.bibtex.domain.
BibliographyKey
(docname, id_)[source]¶ -
property
docname
¶ Alias for field number 0
-
property
id_
¶ Alias for field number 1
-
property
-
class
sphinxcontrib.bibtex.domain.
BibliographyValue
(line: int, bibfiles: List[str], style: str, list_: str, enumtype: str, start: int, labelprefix: str, keyprefix: str, filter_: _ast.AST, citation_nodes: Dict[str, docutils.nodes.citation])[source]¶ Contains information about a bibliography directive.
-
property
bibfiles
¶ List of bib files for this directive.
-
property
citation_nodes
¶ key -> citation node
-
property
enumtype
¶ The sequence type (for enumerated lists).
-
property
filter_
¶ Parsed filter expression.
-
property
keyprefix
¶ String prefix for citation keys.
-
property
labelprefix
¶ String prefix for pybtex generated labels.
-
property
line
¶ Line number of the directive in the document.
-
property
list_
¶ The list type.
-
property
start
¶ The start of the sequence (for enumerated lists).
-
property
style
¶ The pybtex style.
-
property
-
class
sphinxcontrib.bibtex.domain.
Citation
(citation_id: Optional[str], bibliography_key: sphinxcontrib.bibtex.domain.BibliographyKey, key: str, label: str, formatted_entry: pybtex.style.FormattedEntry)[source]¶ Information about a citation.
-
property
bibliography_key
¶ Key of its bibliography directive.
-
property
citation_id
¶ Unique id of this citation.
-
property
formatted_entry
¶ Entry as formatted by pybtex.
-
property
key
¶ Unique citation id used for referencing.
-
property
label
¶ Label (with brackets and label prefix).
-
property
-
class
sphinxcontrib.bibtex.domain.
CitationRef
(citation_ref_id: str, docname: str, line: int, keys: List[str])[source]¶ Information about a citation reference.
-
property
citation_ref_id
¶ Unique id of this citation reference.
-
property
docname
¶ Document name.
-
property
keys
¶ Citation keys (including key prefix).
-
property
line
¶ Line number.
-
property
-
class
sphinxcontrib.bibtex.domain.
BibtexDomain
(env: sphinx.environment.BuildEnvironment)[source]¶ Global bibtex extension information cache.
-
property
bibfiles
¶ Map each bib filename to some information about the file (including the parsed data).
-
property
bibliographies
¶ Map storing information about each bibliography directive.
-
property
citation_refs
¶ Citation reference data.
-
property
citations
¶ Citation data.
-
clear_doc
(docname: str) → None[source]¶ Remove traces of a document in the domain-specific inventories.
-
get_all_cited_keys
(docnames)[source]¶ Yield all citation keys for given docnames in order, then ordered by citation order.
-
get_entries
(bibfiles: List[str]) → Iterable[pybtex.database.Entry][source]¶ Return all bibliography entries from the bib files, unsorted (i.e. in order of appearance in the bib files.
-
get_filtered_entries
(bibliography_key: sphinxcontrib.bibtex.domain.BibliographyKey) → Iterable[Tuple[str, pybtex.database.Entry]][source]¶ Return unsorted bibliography entries filtered by the filter expression.
-
get_formatted_entries
(bibliography_key: sphinxcontrib.bibtex.domain.BibliographyKey, docnames: List[str]) → Iterable[pybtex.style.FormattedEntry][source]¶ Get sorted bibliography entries along with their pybtex labels, with additional sorting and formatting applied from the pybtex style.
-
get_sorted_entries
(bibliography_key: sphinxcontrib.bibtex.domain.BibliographyKey, docnames: List[str]) → Iterable[Tuple[str, pybtex.database.Entry]][source]¶ Return filtered bibliography entries sorted by citation order.
-
merge_domaindata
(docnames: List[str], otherdata: Dict) → None[source]¶ Merge in data regarding docnames from a different domaindata inventory (coming from a subprocess in parallel builds).
-
resolve_xref
(env: sphinx.environment.BuildEnvironment, fromdocname: str, builder: sphinx.builders.Builder, typ: str, target: str, node: sphinx.addnodes.pending_xref, contnode: docutils.nodes.Element) → docutils.nodes.Element[source]¶ Replace node by list of citation references (one for each key).
-
property