Source code for sphinxcontrib.bibtex.nodes
"""
.. autoclass:: bibliography
.. autoclass:: raw_latex
.. autofunction:: visit_raw_latex
.. autofunction:: depart_raw_latex
"""
from docutils import nodes
from sphinx.writers.latex import LaTeXTranslator
[docs]
class bibliography(nodes.General, nodes.Element):
"""Node for representing a bibliography. Replaced by a list of
citations by
:class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`.
"""
pass
[docs]
class raw_latex(
nodes.Special, nodes.Inline, nodes.PreBibliographic, nodes.FixedTextElement
):
"""Node for representing raw latex data."""
pass
[docs]
def visit_raw_latex(self: LaTeXTranslator, node: raw_latex):
"""Called when entering a raw_latex node. Appends the node's raw source
to the latex body.
"""
self.body.append(node.rawsource)
[docs]
def depart_raw_latex(self: LaTeXTranslator, node: raw_latex):
"""Called when leaving a raw_latex node."""
pass