Add Sphinx.add_enumerable_node() to add enumerable nodes for numfig feature

This commit is contained in:
Takeshi KOMIYA
2016-02-13 21:22:21 +09:00
parent 279ac7c23f
commit a391b1a1db
8 changed files with 135 additions and 0 deletions

View File

@@ -125,6 +125,18 @@ package.
.. versionchanged:: 0.5
Added the support for keyword arguments giving visit functions.
.. method:: Sphinx.add_enumerable_node(node, figtype, **kwds)
Register a Docutils node class as a numfig target. Sphinx treats the node as
figure, table or code-block. And then the node is numbered automatically.
*figtype* should be one of ``figure``, ``table`` or ``code-block``.
Other keyword arguments are used for node visitor functions. See the
:meth:`Sphinx.add_node` for details.
.. versionadded:: 1.4
.. method:: Sphinx.add_directive(name, func, content, arguments, **options)
Sphinx.add_directive(name, directiveclass)