Cached Information

Classes and methods to maintain any information that is stored outside the doctree.

class sphinxcontrib.bibtex.cache.Cache[source]

Global bibtex extension information cache. Stored in app.env.bibtex_cache, so must be picklable.

bibfiles

A dict mapping .bib file names (relative to the top source folder) to BibfileCache instances.

bibliographies

Each bibliography directive is assigned an id of the form bibtex-bibliography-xxx. This dict maps each such id to information about the bibliography directive, BibliographyCache. We need to store this extra information separately because it cannot be stored in the bibliography nodes themselves.

purge(docname)[source]

Remove all information related to docname.

Parameters:docname (str) – The document name.
class sphinxcontrib.bibtex.cache.BibfileCache(mtime=None, data=None)[source]

Contains information about a parsed .bib file.

mtime

A float representing the modification time of the .bib file when it was last parsed.

data

A pybtex.database.BibliographyData containing the parsed .bib file.

class sphinxcontrib.bibtex.cache.BibliographyCache(docname=None, bibfiles=None, cite='cited', style=None, encoding=None, curly_bracket_strip=True)[source]

Contains information about a bibliography directive.

docname

A str containing the name of the document in which the directive occurs. We need this information during the Sphinx event env-purge-doc.

bibfiles

A list of strs containing the .bib file names (relative to the top source folder) that contain the references.

cite

A str. Should be one of:

"cited"
Only generate cited references.
"notcited"
Only generated non-cited references.
"all"
Generate all references from the .bib files.
style

The bibtex style.

Project Versions

Previous topic

New Doctree Transforms

Next topic

Changes

This Page