You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
934 B
39 lines
934 B
8 months ago
|
"""
|
||
|
.. autoclass:: bibliography
|
||
|
.. autoclass:: raw_latex
|
||
|
.. autofunction:: visit_raw_latex
|
||
|
.. autofunction:: depart_raw_latex
|
||
|
"""
|
||
|
|
||
|
from docutils import nodes
|
||
|
from sphinx.writers.latex import LaTeXTranslator
|
||
|
|
||
|
|
||
|
class bibliography(nodes.General, nodes.Element):
|
||
|
"""Node for representing a bibliography. Replaced by a list of
|
||
|
citations by
|
||
|
:class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`.
|
||
|
"""
|
||
|
|
||
|
pass
|
||
|
|
||
|
|
||
|
class raw_latex(
|
||
|
nodes.Special, nodes.Inline, nodes.PreBibliographic, nodes.FixedTextElement
|
||
|
):
|
||
|
"""Node for representing raw latex data."""
|
||
|
|
||
|
pass
|
||
|
|
||
|
|
||
|
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)
|
||
|
|
||
|
|
||
|
def depart_raw_latex(self: LaTeXTranslator, node: raw_latex):
|
||
|
"""Called when leaving a raw_latex node."""
|
||
|
pass
|