# API

The backend renders `pybtex.richtext.Text` instances into a list of `docutils.nodes.Text` and `docutils.nodes.inline` instances (or subclasses of these). 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.

Note that you should not import the `pybtex_docutils` module directly. Instead, use pybtex’s plugin system to get the `Backend` class, again, as in the minimal example.

class `pybtex_docutils.``Backend`(encoding=None)

  Bases: `pybtex.backends.BaseBackend`

  `RenderType`

    alias of `list`

  `citation`(entry, document, use_key_as_label=True)

    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, document, use_key_as_label=True)

    Return citation_reference node to the given citation. The citation_reference is expected to be inserted into document prior to any docutils transforms.

  `paragraph`(entry)

    Return a docutils.nodes.paragraph containing the rendered text for entry (without label).

    New in version 0.2.0.