diff options
| author | Georg Brandl <georg@python.org> | 2010-08-05 13:39:23 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-08-05 13:39:23 +0200 |
| commit | 6df4ce4445517da55db5dfba4f139d8d2cd591ae (patch) | |
| tree | 1172a7da36e6a8e4862e881d5bff10535676ee50 /doc/ext | |
| parent | 50e8b6ac9e4bda6a1131fe34648259f0be807c0d (diff) | |
| download | sphinx-6df4ce4445517da55db5dfba4f139d8d2cd591ae.tar.gz | |
#481, #482: fix ``.name`` reference matching.
#482: When doing a non-exact search, match only the given type of object.
#481: Apply non-exact search for Python reference targets with ``.name`` for modules too.
Diffstat (limited to 'doc/ext')
| -rw-r--r-- | doc/ext/appapi.rst | 4 | ||||
| -rw-r--r-- | doc/ext/autodoc.rst | 40 | ||||
| -rw-r--r-- | doc/ext/inheritance.rst | 2 | ||||
| -rw-r--r-- | doc/ext/math.rst | 8 |
4 files changed, 29 insertions, 25 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst index 402dd72f..2717c6a8 100644 --- a/doc/ext/appapi.rst +++ b/doc/ext/appapi.rst @@ -210,7 +210,7 @@ the following public API: standard Sphinx roles (see :ref:`xref-syntax`). This method is also available under the deprecated alias - :meth:`add_description_unit`. + ``add_description_unit``. .. method:: Sphinx.add_crossref_type(directivename, rolename, indextemplate='', ref_nodeclass=None, objname='') @@ -272,6 +272,8 @@ the following public API: This allows to auto-document new types of objects. See the source of the autodoc module for examples on how to subclass :class:`Documenter`. + .. XXX add real docs for Documenter and subclassing + .. versionadded:: 0.6 .. method:: Sphinx.add_autodoc_attrgetter(type, getter) diff --git a/doc/ext/autodoc.rst b/doc/ext/autodoc.rst index bd725cfa..81333101 100644 --- a/doc/ext/autodoc.rst +++ b/doc/ext/autodoc.rst @@ -27,20 +27,21 @@ two locations for documentation, while at the same time avoiding auto-generated-looking pure API documentation. :mod:`autodoc` provides several directives that are versions of the usual -:rst:dir:`module`, :rst:dir:`class` and so forth. On parsing time, they import the -corresponding module and extract the docstring of the given objects, inserting -them into the page source under a suitable :rst:dir:`module`, :rst:dir:`class` etc. -directive. +:rst:dir:`py:module`, :rst:dir:`py:class` and so forth. On parsing time, they +import the corresponding module and extract the docstring of the given objects, +inserting them into the page source under a suitable :rst:dir:`py:module`, +:rst:dir:`py:class` etc. directive. .. note:: - Just as :rst:dir:`class` respects the current :rst:dir:`module`, :rst:dir:`autoclass` - will also do so, and likewise with :rst:dir:`method` and :rst:dir:`class`. + Just as :rst:dir:`py:class` respects the current :rst:dir:`py:module`, + :rst:dir:`autoclass` will also do so. Likewise, :rst:dir:`automethod` will + respect the current :rst:dir:`py:class`. .. rst:directive:: automodule - autoclass - autoexception + autoclass + autoexception Document a module, class or exception. All three directives will by default only insert the docstring of the object itself:: @@ -127,23 +128,24 @@ directive. .. versionadded:: 0.4 - * The :rst:dir:`automodule`, :rst:dir:`autoclass` and :rst:dir:`autoexception` directives - also support a flag option called ``show-inheritance``. When given, a list - of base classes will be inserted just below the class signature (when used - with :rst:dir:`automodule`, this will be inserted for every class that is - documented in the module). + * The :rst:dir:`automodule`, :rst:dir:`autoclass` and + :rst:dir:`autoexception` directives also support a flag option called + ``show-inheritance``. When given, a list of base classes will be inserted + just below the class signature (when used with :rst:dir:`automodule`, this + will be inserted for every class that is documented in the module). .. versionadded:: 0.4 * All autodoc directives support the ``noindex`` flag option that has the - same effect as for standard :rst:dir:`function` etc. directives: no index - entries are generated for the documented object (and all autodocumented - members). + same effect as for standard :rst:dir:`py:function` etc. directives: no + index entries are generated for the documented object (and all + autodocumented members). .. versionadded:: 0.4 * :rst:dir:`automodule` also recognizes the ``synopsis``, ``platform`` and - ``deprecated`` options that the standard :rst:dir:`module` directive supports. + ``deprecated`` options that the standard :rst:dir:`py:module` directive + supports. .. versionadded:: 0.5 @@ -213,8 +215,8 @@ There are also new config values that you can set: ``"class"`` Only the class' docstring is inserted. This is the default. You can - still document ``__init__`` as a separate method using :rst:dir:`automethod` - or the ``members`` option to :rst:dir:`autoclass`. + still document ``__init__`` as a separate method using + :rst:dir:`automethod` or the ``members`` option to :rst:dir:`autoclass`. ``"both"`` Both the class' and the ``__init__`` method's docstring are concatenated and inserted. diff --git a/doc/ext/inheritance.rst b/doc/ext/inheritance.rst index 76388a94..cdd01791 100644 --- a/doc/ext/inheritance.rst +++ b/doc/ext/inheritance.rst @@ -17,7 +17,7 @@ It adds this directive: This directive has one or more arguments, each giving a module or class name. Class names can be unqualified; in that case they are taken to exist - in the currently described module (see :rst:dir:`module`). + in the currently described module (see :rst:dir:`py:module`). For each given class, and each class in each given module, the base classes are determined. Then, from all classes and their base classes, a graph is diff --git a/doc/ext/math.rst b/doc/ext/math.rst index b9f6ab12..f2896c39 100644 --- a/doc/ext/math.rst +++ b/doc/ext/math.rst @@ -17,15 +17,15 @@ if possible, reuse that support too. .. note:: - :mod:`sphinx.ext.mathbase` is not meant to be added to the - :confval:`extensions` config value, instead, use either - :mod:`sphinx.ext.pngmath` or :mod:`sphinx.ext.jsmath` as described below. + :mod:`.mathbase` is not meant to be added to the :confval:`extensions` config + value, instead, use either :mod:`sphinx.ext.pngmath` or + :mod:`sphinx.ext.jsmath` as described below. The input language for mathematics is LaTeX markup. This is the de-facto standard for plain-text math notation and has the added advantage that no further translation is necessary when building LaTeX output. -:mod:`mathbase` defines these new markup elements: +:mod:`.mathbase` defines these new markup elements: .. rst:role:: math |
