summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/markup/code.rst7
-rw-r--r--doc/markup/inline.rst9
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index 28f752365..93cd127ba 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -99,7 +99,9 @@ Includes
.. literalinclude:: example.py
- The file name is relative to the current file's path.
+ The file name is usually relative to the current file's path. However, if it
+ is absolute (starting with ``/``), it is relative to the top source
+ directory.
The directive also supports the ``linenos`` flag option to switch on line
numbers, and a ``language`` option to select a language different from the
@@ -144,7 +146,8 @@ Includes
.. versionadded:: 0.4.3
The ``encoding`` option.
.. versionadded:: 0.6
- The ``pyobject``, ``lines``, ``start-after`` and ``end-before`` options.
+ The ``pyobject``, ``lines``, ``start-after`` and ``end-before`` options,
+ as well as support for absolute filenames.
.. rubric:: Footnotes
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst
index 9f8a01a56..97b20da79 100644
--- a/doc/markup/inline.rst
+++ b/doc/markup/inline.rst
@@ -264,9 +264,12 @@ Referencing downloadable files
See :download:`this example script <../example.py>`.
- The given filename is relative to the directory the current source file is
- contained in. The ``../example.py`` file will be copied to the output
- directory, and a suitable link generated to it.
+ The given filename is usually relative to the directory the current source
+ file is contained in, but if it absolute (starting with ``/``), it is taken
+ as relative to the top source directory.
+
+ The ``example.py`` file will be copied to the output directory, and a
+ suitable link generated to it.
Other semantic markup