diff options
| author | Georg Brandl <georg@python.org> | 2014-01-12 17:04:58 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-01-12 17:04:58 +0100 |
| commit | b2694d81fb8f7e59ccdf331ddabab754cc3073a1 (patch) | |
| tree | bb9582f7f209723def3af136fe05e2212298d74a /doc/markup | |
| parent | dd9650fd0476655bddbe99c50e76ac52774e0e11 (diff) | |
| parent | b4c916811a5522976d4ae483230fe76296a38b4e (diff) | |
| download | sphinx-b2694d81fb8f7e59ccdf331ddabab754cc3073a1.tar.gz | |
merge with stable
Diffstat (limited to 'doc/markup')
| -rw-r--r-- | doc/markup/code.rst | 20 | ||||
| -rw-r--r-- | doc/markup/toctree.rst | 5 |
2 files changed, 19 insertions, 6 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst index 98fdad7d..6e707e00 100644 --- a/doc/markup/code.rst +++ b/doc/markup/code.rst @@ -86,6 +86,14 @@ on line numbers for the individual block:: Some more Ruby code. +The first line number can be selected with the ``lineno-start`` option. If +present, ``linenos`` is automatically activated as well. + + .. code-block:: ruby + :lineno-start: 10 + + Some more Ruby code, with line numbering starting at 10. + Additionally, an ``emphasize-lines`` option can be given to have Pygments emphasize particular lines:: @@ -101,6 +109,9 @@ emphasize particular lines:: .. versionchanged:: 1.1 ``emphasize-lines`` has been added. +.. versionchanged:: 1.3 + ``lineno-start`` has been added. + Includes ^^^^^^^^ @@ -121,10 +132,11 @@ Includes Tabs in the input are expanded if you give a ``tab-width`` option with the desired tab width. - The directive also supports the ``linenos`` flag option to switch on line - numbers, the ``emphasize-lines`` option to emphasize particular lines, and - a ``language`` option to select a language different from the current - file's standard language. Example with options:: + Like :rst:dir:`code-block`, the directive supports the ``linenos`` flag + option to switch on line numbers, the ``lineno-start`` option to select the + first line number, the ``emphasize-lines`` option to emphasize particular + lines, and a ``language`` option to select a language different from the + current file's standard language. Example with options:: .. literalinclude:: example.rb :language: ruby diff --git a/doc/markup/toctree.rst b/doc/markup/toctree.rst index 9316e69a..fdecc37d 100644 --- a/doc/markup/toctree.rst +++ b/doc/markup/toctree.rst @@ -141,8 +141,9 @@ tables of contents. The ``toctree`` directive is the central element. 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 - be reachable through standard navigation. Use :confval:`exclude_patterns` to - explicitly exclude documents or directories from building. + be reachable through standard navigation. Use :ref:`metadata` to remove the + warning, and :confval:`exclude_patterns` to explicitly exclude documents or + directories from building. The "master document" (selected by :confval:`master_doc`) is the "root" of the TOC tree hierarchy. It can be used as the documentation's main page, or |
