API¶
The backend renders pybtex.richtext.Text
instances
into a list of docutils.nodes.Node
instances.
For typical use cases, all you need to care about are the methods
Backend.paragraph()
,
Backend.citation()
, and
Backend.citation_reference()
which are to be called on formatted entries,
as in the minimal example.
Unless you are subclassing Backend
to create a new backend,
you should normally not import the pybtex_docutils
module directly.
Instead, use pybtex’s plugin system to get the Backend
class,
as in the minimal example.
-
class
pybtex_docutils.
Backend
(encoding=None)[source]¶ Bases:
pybtex.backends.BaseBackend
-
RenderType
¶ alias of
builtins.list
-
citation
(entry: FormattedEntry, document: docutils.nodes.document, use_key_as_label=True) → docutils.nodes.citation[source]¶ Return citation node, with key as name, label as first child, and paragraph with entry text as second child. The citation is expected to be inserted into document prior to any docutils transforms.
-
citation_reference
(entry: FormattedEntry, document: docutils.nodes.document, use_key_as_label=True) → docutils.nodes.citation_reference[source]¶ Return citation_reference node to the given citation. The citation_reference is expected to be inserted into document prior to any docutils transforms.
-
footnote
(entry: FormattedEntry, document: docutils.nodes.document) → docutils.nodes.footnote[source]¶ Return footnote node, with key as name, and paragraph with entry text as child. The footnote is expected to be inserted into document prior to any docutils transforms.
New in version 0.2.2.
-