summaryrefslogtreecommitdiff
path: root/doc/markup/code.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-17 07:25:31 +0100
committerGeorg Brandl <georg@python.org>2014-01-17 07:25:31 +0100
commitcaf7fccc80bc2fb485599113bb4e977de0729169 (patch)
treea841e992d1dacb1468656a5584e3ab93b72ed44e /doc/markup/code.rst
parent97df8becb0e97373d76c5d8809d50711a987cf92 (diff)
parentd0dccd32a9d4e0960c5be9a801b14a3739670684 (diff)
downloadsphinx-caf7fccc80bc2fb485599113bb4e977de0729169.tar.gz
merge with stable
Diffstat (limited to 'doc/markup/code.rst')
-rw-r--r--doc/markup/code.rst20
1 files changed, 16 insertions, 4 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