summaryrefslogtreecommitdiff
path: root/doc/ext
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ext')
-rw-r--r--doc/ext/appapi.rst16
-rw-r--r--doc/ext/autodoc.rst2
-rw-r--r--doc/ext/doctest.rst6
-rw-r--r--doc/ext/intersphinx.rst2
-rw-r--r--doc/ext/math.rst6
-rw-r--r--doc/ext/todo.rst4
-rw-r--r--doc/ext/tutorial.rst24
7 files changed, 30 insertions, 30 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index 3dd5282b1..84978da3a 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -45,12 +45,12 @@ the following public API:
:exc:`docutils.nodes.SkipNode`. Example::
class math(docutils.nodes.Element)
-
+
def visit_math_html(self, node):
self.body.append(self.starttag(node, 'math'))
def depart_math_html(self, node):
self.body.append('</math>')
-
+
app.add_node(math, html=(visit_math_html, depart_math_html))
Obviously, translators for which you don't specify visitor methods will choke
@@ -174,7 +174,7 @@ the following public API:
highlight code blocks with the given language *alias*.
.. versionadded:: 0.6
-
+
.. method:: Sphinx.connect(event, callback)
Register *callback* to be called when *event* is emitted. For details on
@@ -237,7 +237,7 @@ registered event handlers.
since the module declarations could have been removed from the file.
.. versionadded:: 0.5
-
+
.. event:: source-read (app, docname, source)
Emitted when a source file has been read. The *source* argument is a list
@@ -249,7 +249,7 @@ registered event handlers.
``:math:`...```.
.. versionadded:: 0.5
-
+
.. event:: doctree-read (app, doctree)
Emitted when a doctree has been parsed and read by the environment, and is
@@ -271,7 +271,7 @@ registered event handlers.
future reference and should be a child of the returned reference node.
.. versionadded:: 0.5
-
+
.. event:: doctree-resolved (app, doctree, docname)
Emitted when a doctree has been "resolved" by the environment, that is, all
@@ -287,7 +287,7 @@ registered event handlers.
completed, that is, the environment and all doctrees are now up-to-date.
.. versionadded:: 0.5
-
+
.. event:: page-context (app, pagename, templatename, context, doctree)
Emitted when the HTML builder has created a context dictionary to render a
@@ -318,7 +318,7 @@ registered event handlers.
cleanup actions depending on the exception status.
.. versionadded:: 0.5
-
+
.. _template-bridge:
diff --git a/doc/ext/autodoc.rst b/doc/ext/autodoc.rst
index e0766938e..11ea4ab40 100644
--- a/doc/ext/autodoc.rst
+++ b/doc/ext/autodoc.rst
@@ -61,7 +61,7 @@ directive.
Boil the noodle *time* minutes.
**Options and advanced usage**
-
+
* If you want to automatically document members, there's a ``members``
option::
diff --git a/doc/ext/doctest.rst b/doc/ext/doctest.rst
index 7117f6a90..19905dc7d 100644
--- a/doc/ext/doctest.rst
+++ b/doc/ext/doctest.rst
@@ -131,7 +131,7 @@ completely equivalent. ::
Test-Output example:
- .. testcode::
+ .. testcode::
parrot.voom(3000)
@@ -156,7 +156,7 @@ There are also these config values for customizing the doctest extension:
e.g. import modules you will always need in your doctests.
.. versionadded:: 0.6
-
+
.. confval:: doctest_test_doctest_blocks
If this is a nonempty string (the default is ``'default'``), standard reST
@@ -187,7 +187,7 @@ There are also these config values for customizing the doctest extension:
>>> print 1
1
- Some more documentation text.
+ Some more documentation text.
This feature makes it easy for you to test doctests in docstrings included
with the :mod:`~sphinx.ext.autodoc` extension without marking them up with a
diff --git a/doc/ext/intersphinx.rst b/doc/ext/intersphinx.rst
index befae2c07..302ab6a32 100644
--- a/doc/ext/intersphinx.rst
+++ b/doc/ext/intersphinx.rst
@@ -49,7 +49,7 @@ linking:
This will download the corresponding :file:`objects.inv` file from the
Internet and generate links to the pages under the given URI. The downloaded
inventory is cached in the Sphinx environment, so it must be redownloaded
- whenever you do a full rebuild.
+ whenever you do a full rebuild.
A second example, showing the meaning of a non-``None`` value::
diff --git a/doc/ext/math.rst b/doc/ext/math.rst
index f2664dfe4..57d844ffd 100644
--- a/doc/ext/math.rst
+++ b/doc/ext/math.rst
@@ -90,7 +90,7 @@ further translation is necessary when building LaTeX output.
Euler's identity, equation :eq:`euler`, was elected one of the most
beautiful mathematical formulas.
-
+
:mod:`sphinx.ext.pngmath` -- Render math as PNG images
------------------------------------------------------
@@ -133,7 +133,7 @@ There are various config values you can set to influence how the images are buil
list.
.. versionadded:: 0.5.1
-
+
.. confval:: pngmath_latex_preamble
Additional LaTeX code to put into the preamble of the short LaTeX files that
@@ -145,7 +145,7 @@ There are various config values you can set to influence how the images are buil
Additional arguments to give to dvipng, as a list. The default value is
``['-gamma 1.5', '-D 110']`` which makes the image a bit darker and larger
then it is by default.
-
+
An arguments you might want to add here is e.g. ``'-bg Transparent'``,
which produces PNGs with a transparent background. This is not enabled by
default because some Internet Explorer versions don't like transparent PNGs.
diff --git a/doc/ext/todo.rst b/doc/ext/todo.rst
index 7bc65a02b..4f5a379dc 100644
--- a/doc/ext/todo.rst
+++ b/doc/ext/todo.rst
@@ -21,9 +21,9 @@ There are two additional directives when using this extension:
This directive is replaced by a list of all todo directives in the whole
documentation, if :confval:`todo_include_todos` is true.
-
+
There is also an additional config value:
-
+
.. confval:: todo_include_todos
If this is ``True``, :dir:`todo` and :dir:`todolist` produce output, else
diff --git a/doc/ext/tutorial.rst b/doc/ext/tutorial.rst
index ae9b7a775..85763e834 100644
--- a/doc/ext/tutorial.rst
+++ b/doc/ext/tutorial.rst
@@ -158,7 +158,7 @@ Let's start with the node classes::
def visit_todo_node(self, node):
self.visit_admonition(node)
-
+
def depart_todo_node(self, node):
self.depart_admonition(node)
@@ -190,14 +190,14 @@ The ``todo`` directive function looks like this::
def todo_directive(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
env = state.document.settings.env
-
+
targetid = "todo-%s" % env.index_num
env.index_num += 1
targetnode = nodes.target('', '', ids=[targetid])
-
+
ad = make_admonition(todo, name, [_('Todo')], options, content, lineno,
content_offset, block_text, state, state_machine)
-
+
if not hasattr(env, 'todo_all_todos'):
env.todo_all_todos = []
env.todo_all_todos.append({
@@ -206,7 +206,7 @@ The ``todo`` directive function looks like this::
'todo': ad[0].deepcopy(),
'target': targetnode,
})
-
+
return [targetnode] + ad
Several important things are covered here. First, as you can see, you can refer
@@ -264,18 +264,18 @@ emitted at the end of phase 3 and allows custom resolving to be done::
if not app.config.todo_include_todos:
for node in doctree.traverse(todo_node):
node.parent.remove(node)
-
+
# Replace all todolist nodes with a list of the collected todos.
# Augment each todo with a backlink to the original location.
env = app.builder.env
-
+
for node in doctree.traverse(todolist):
if not app.config.todo_include_todos:
node.replace_self([])
continue
-
+
content = []
-
+
for todo_info in env.todo_all_todos:
para = nodes.paragraph()
filename = env.doc2path(todo_info['docname'], base=None)
@@ -283,7 +283,7 @@ emitted at the end of phase 3 and allows custom resolving to be done::
_('(The original entry is located in %s, line %d and can be found ') %
(filename, todo_info['lineno']))
para += nodes.Text(description, description)
-
+
# Create a reference
newnode = nodes.reference('', '')
innernode = nodes.emphasis(_('here'), _('here'))
@@ -294,11 +294,11 @@ emitted at the end of phase 3 and allows custom resolving to be done::
newnode.append(innernode)
para += newnode
para += nodes.Text('.)', '.)')
-
+
# Insert into the todolist
content.append(todo_info['todo'])
content.append(para)
-
+
node.replace_self(content)
It is a bit more involved. If our new "todo_include_todos" config value is