diff options
| author | Georg Brandl <georg@python.org> | 2009-01-10 22:18:18 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-01-10 22:18:18 +0100 |
| commit | 6d564844e830c1faaf746460327bd14f3234171e (patch) | |
| tree | 5044c2146ca4b1756136040d0b4365685b0c4f84 /doc | |
| parent | ac92e5497ec6704b661ca3e7539ce2799fda2ef4 (diff) | |
| download | sphinx-6d564844e830c1faaf746460327bd14f3234171e.tar.gz | |
Fix more line length and trailing whitespace.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/_templates/index.html | 2 | ||||
| -rw-r--r-- | doc/builders.rst | 4 | ||||
| -rw-r--r-- | doc/concepts.rst | 10 | ||||
| -rw-r--r-- | doc/conf.py | 5 | ||||
| -rw-r--r-- | doc/config.rst | 22 | ||||
| -rw-r--r-- | doc/contents.rst | 2 | ||||
| -rw-r--r-- | doc/ext/appapi.rst | 16 | ||||
| -rw-r--r-- | doc/ext/autodoc.rst | 2 | ||||
| -rw-r--r-- | doc/ext/doctest.rst | 6 | ||||
| -rw-r--r-- | doc/ext/intersphinx.rst | 2 | ||||
| -rw-r--r-- | doc/ext/math.rst | 6 | ||||
| -rw-r--r-- | doc/ext/todo.rst | 4 | ||||
| -rw-r--r-- | doc/ext/tutorial.rst | 24 | ||||
| -rw-r--r-- | doc/intro.rst | 2 | ||||
| -rw-r--r-- | doc/markup/code.rst | 2 | ||||
| -rw-r--r-- | doc/markup/desc.rst | 2 | ||||
| -rw-r--r-- | doc/markup/para.rst | 8 | ||||
| -rw-r--r-- | doc/rest.rst | 6 |
18 files changed, 63 insertions, 62 deletions
diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 43d07e82..1c399f92 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -81,5 +81,5 @@ </p> <p>The code can be found in a Mercurial repository, at <tt>http://bitbucket.org/birkenfeld/sphinx/</tt>.</p> - + {% endblock %} diff --git a/doc/builders.rst b/doc/builders.rst index dd07a96a..0055a28b 100644 --- a/doc/builders.rst +++ b/doc/builders.rst @@ -29,7 +29,7 @@ The builder's "name" must be given to the **-b** command-line option of also generates HTML Help support files that allow the Microsoft HTML Help Workshop to compile them into a CHM file. - Its name is ``htmlhelp``. + Its name is ``htmlhelp``. .. module:: sphinx.builders.latex .. class:: LaTeXBuilder @@ -85,7 +85,7 @@ The builder's "name" must be given to the **-b** command-line option of .. _PHP serialization: http://pypi.python.org/pypi/phpserialize .. attribute:: implementation - + A module that implements `dump()`, `load()`, `dumps()` and `loads()` functions that conform to the functions with the same names from the pickle module. Known modules implementing this interface are diff --git a/doc/concepts.rst b/doc/concepts.rst index 379888ff..afb9503b 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -55,19 +55,19 @@ tables of contents. The ``toctree`` directive is the central element. ``strings`` and so forth, and it knows that they are children of the shown document, the library index. From this information it generates "next chapter", "previous chapter" and "parent chapter" links. - + Document titles in the :dir:`toctree` will be automatically read from the title of the referenced document. If that isn't what you want, you can give the specify an explicit title and target using a similar syntax to reST hyperlinks (and Sphinx's :ref:`cross-referencing syntax <xref-syntax>`). This looks like:: - + .. toctree:: - + intro All about strings <strings> datatypes - + The second line above will link to the ``strings`` document, but will use the title "All about strings" instead of the title of the ``strings`` document. @@ -97,7 +97,7 @@ tables of contents. The ``toctree`` directive is the central element. This will still notify Sphinx of the document hierarchy, but not insert links into the document at the location of the directive -- this makes sense if you intend to insert these links yourself, in a different style. - + In the end, all documents in the :term:`source directory` (or subdirectories) must occur in some ``toctree`` directive; Sphinx will emit a warning if it finds a file that is not included, because that means that this file will not diff --git a/doc/conf.py b/doc/conf.py index b3bd7149..e1c89eae 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -59,7 +59,7 @@ html_use_opensearch = 'http://sphinx.pocoo.org' htmlhelp_basename = 'Sphinxdoc' # Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, document class [howto/manual]). +# (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation', 'Georg Brandl', 'manual', 1)] @@ -125,5 +125,6 @@ def setup(app): app.add_description_unit('directive', 'dir', 'pair: %s; directive', parse_directive) app.add_description_unit('role', 'role', 'pair: %s; role', parse_role) - app.add_description_unit('confval', 'confval', 'pair: %s; configuration value') + app.add_description_unit('confval', 'confval', + 'pair: %s; configuration value') app.add_description_unit('event', 'event', 'pair: %s; event', parse_event) diff --git a/doc/config.rst b/doc/config.rst index dd25cf22..ff2ca909 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -76,7 +76,7 @@ General configuration .. versionadded:: 0.5 Previously, Sphinx accepted only UTF-8 encoded sources. - + .. confval:: master_doc The document name of the "master" document, that is, the document that @@ -166,7 +166,7 @@ General configuration Project information ------------------- - + .. confval:: project The documented project's name. @@ -233,7 +233,7 @@ Project information :ref:`code-examples` for more details. .. versionadded:: 0.5 - + .. confval:: pygments_style The style name to use for Pygments highlighting of source code. Default is @@ -341,7 +341,7 @@ that use Sphinx' HTMLWriter class. .. versionadded:: 0.6 Previously, this was always activated. - + .. confval:: html_sidebars Custom sidebar templates, must be a dictionary that maps document names to @@ -439,7 +439,7 @@ that use Sphinx' HTMLWriter class. support different web server setups). .. versionadded:: 0.6 - + .. confval:: html_translator_class A string with the fully-qualified name of a HTML Translator class, that is, a @@ -527,7 +527,7 @@ These options influence LaTeX output. avoid interpretation as escape sequences. * Keys that you may want to override include: - + ``'papersize'`` Paper size option of the document class (``'a4paper'`` or ``'letterpaper'``), default ``'letterpaper'``. @@ -551,9 +551,9 @@ These options influence LaTeX output. Additional preamble content, default empty. ``'footer'``` Additional footer content (before the indices), default empty. - + * Keys that don't need be overridden unless in special cases are: - + ``'inputenc'`` "inputenc" package inclusion, default ``'\\usepackage[utf8]{inputenc}'``. @@ -570,9 +570,9 @@ These options influence LaTeX output. "printindex" call, the last thing in the file, default ``'\\printindex'``. Override if you want to generate the index differently or append some content after the index. - + * Keys that are set by other options and therefore should not be overridden are: - + ``'docclass'`` ``'classoptions'`` ``'title'`` @@ -585,7 +585,7 @@ These options influence LaTeX output. ``'makemodindex'`` ``'shorthandoff'`` ``'printmodindex'`` - + .. confval:: latex_preamble Additional LaTeX markup for the preamble. diff --git a/doc/contents.rst b/doc/contents.rst index 6ddbcbcb..5a1187ee 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -14,7 +14,7 @@ Sphinx documentation contents config templating extensions - + glossary changes examples diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst index 3dd5282b..84978da3 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 e0766938..11ea4ab4 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 7117f6a9..19905dc7 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 befae2c0..302ab6a3 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 f2664dfe..57d844ff 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 7bc65a02..4f5a379d 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 ae9b7a77..85763e83 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 diff --git a/doc/intro.rst b/doc/intro.rst index 7ce9d1fa..f9e23e18 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -109,7 +109,7 @@ The :program:`sphinx-build` script has several more options: Don't look for a configuration file; only take options via the ``-D`` option. .. versionadded:: 0.5 - + **-D** *setting=value* Override a configuration value set in the :file:`conf.py` file. The value must be a string or dictionary value. For the latter, supply the setting diff --git a/doc/markup/code.rst b/doc/markup/code.rst index 0bf8343b..4872d6a4 100644 --- a/doc/markup/code.rst +++ b/doc/markup/code.rst @@ -101,7 +101,7 @@ Includes The directive also supports the ``linenos`` flag option to switch on line numbers, and a ``language`` option to select a language different from the current file's standard language. Example with options:: - + .. literalinclude:: example.rb :language: ruby :linenos: diff --git a/doc/markup/desc.rst b/doc/markup/desc.rst index 67605c77..ec8ede37 100644 --- a/doc/markup/desc.rst +++ b/doc/markup/desc.rst @@ -260,7 +260,7 @@ explained by an example:: .. function:: format_exception(etype, value, tb[, limit=None]) Format the exception with a traceback. - + :param etype: exception type :param value: exception value :param tb: traceback object diff --git a/doc/markup/para.rst b/doc/markup/para.rst index b071e46c..2ea2fd2d 100644 --- a/doc/markup/para.rst +++ b/doc/markup/para.rst @@ -1,4 +1,4 @@ -.. highlight:: rest +x.. highlight:: rest Paragraph-level markup ---------------------- @@ -85,9 +85,9 @@ units as well as normal text: This directive creates a paragraph heading that is not used to create a table of contents node. - + .. note:: - + If the *title* of the rubric is "Footnotes", this rubric is ignored by the LaTeX writer, since it is assumed to only contain footnote definitions and therefore would create an empty heading. @@ -239,7 +239,7 @@ the definition of the symbol. There is this directive: Note that no further reST parsing is done in the production, so that you don't have to escape ``*`` or ``|`` characters. -.. XXX describe optional first parameter +.. XXX describe optional first parameter The following is an example taken from the Python Reference Manual:: diff --git a/doc/rest.rst b/doc/rest.rst index d7ef5c7b..2b6ba8c5 100644 --- a/doc/rest.rst +++ b/doc/rest.rst @@ -282,7 +282,7 @@ markup blocks, like this:: See the `reST reference for substitutions <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions>`_ for details. - + If you want to use some substitutions for all documents, put them into a separate file and include it into all documents you want to use them in, using the :dir:`include` directive. Be sure to give the include file a file name @@ -301,7 +301,7 @@ footnotes above) is regarded as a comment. For example:: .. This is a comment. You can indent text after a comment start to form multiline comments:: - + .. This whole indented block is a comment. @@ -329,5 +329,5 @@ There are some problems one commonly runs into while authoring reST documents: * **No nested inline markup:** Something like ``*see :func:`foo`*`` is not possible. - + .. XXX more? |
