From e863fd965dd6253243c3342bd6f0adc4fc8aec4d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 13:31:33 +0200 Subject: Adding upstream version 5.3.0. Signed-off-by: Daniel Baumann --- tests/roots/test-footnotes/bar.rst | 6 ++ tests/roots/test-footnotes/baz.rst | 6 ++ tests/roots/test-footnotes/conf.py | 1 + tests/roots/test-footnotes/index.rst | 188 +++++++++++++++++++++++++++++++++++ tests/roots/test-footnotes/rimg.png | Bin 0 -> 120 bytes 5 files changed, 201 insertions(+) create mode 100644 tests/roots/test-footnotes/bar.rst create mode 100644 tests/roots/test-footnotes/baz.rst create mode 100644 tests/roots/test-footnotes/conf.py create mode 100644 tests/roots/test-footnotes/index.rst create mode 100644 tests/roots/test-footnotes/rimg.png (limited to 'tests/roots/test-footnotes') diff --git a/tests/roots/test-footnotes/bar.rst b/tests/roots/test-footnotes/bar.rst new file mode 100644 index 0000000..660c663 --- /dev/null +++ b/tests/roots/test-footnotes/bar.rst @@ -0,0 +1,6 @@ +bar +=== + +Same footnote number [1]_ in bar.rst + +.. [1] footnote in bar diff --git a/tests/roots/test-footnotes/baz.rst b/tests/roots/test-footnotes/baz.rst new file mode 100644 index 0000000..af496c5 --- /dev/null +++ b/tests/roots/test-footnotes/baz.rst @@ -0,0 +1,6 @@ +baz +=== + +Auto footnote number [#]_ in baz.rst + +.. [#] footnote in baz diff --git a/tests/roots/test-footnotes/conf.py b/tests/roots/test-footnotes/conf.py new file mode 100644 index 0000000..a45d22e --- /dev/null +++ b/tests/roots/test-footnotes/conf.py @@ -0,0 +1 @@ +exclude_patterns = ['_build'] diff --git a/tests/roots/test-footnotes/index.rst b/tests/roots/test-footnotes/index.rst new file mode 100644 index 0000000..9ac1a9c --- /dev/null +++ b/tests/roots/test-footnotes/index.rst @@ -0,0 +1,188 @@ +=============== +test-footenotes +=============== + +.. toctree:: + + bar + baz + +.. contents:: + :local: + +The section with a reference to [AuthorYear]_ +============================================= + +.. figure:: rimg.png + + This is the figure caption with a reference to [AuthorYear]_. + +.. list-table:: The table title with a reference to [AuthorYear]_ + :header-rows: 1 + + * - Header1 + - Header2 + * - Content + - Content + +.. rubric:: The rubric title with a reference to [AuthorYear]_ + +.. [#] First + +* First footnote: [#]_ +* Second footnote: [1]_ +* `Sphinx `_ +* Third footnote: [#]_ +* Fourth footnote: [#named]_ +* `URL including tilde `_ +* GitHub Page: `https://github.com/sphinx-doc/sphinx `_ +* Mailing list: `sphinx-dev@googlegroups.com `_ + +.. [AuthorYear] Author, Title, Year +.. [1] Second +.. [#] Third [#]_ +.. [#] Footnote inside footnote +.. [#named] Fourth + +The section with a reference to [#]_ +===================================== + +.. [#] Footnote in section + +`URL in term `_ + Description Description Description ... + +Footnote in term [#]_ + Description Description Description ... + + `Term in deflist `_ + Description2 + +.. [#] Footnote in term + +.. figure:: rimg.png + + This is the figure caption with a footnote to [#]_. + +.. [#] Footnote in caption + +.. list-table:: footnote [#]_ in caption of normal table + :widths: 1 1 + :header-rows: 1 + + * - name + - desc + * - a + - b + * - a + - b + +.. [#] Foot note in table + +.. list-table:: footnote [#]_ in caption [#]_ of longtable + :widths: 1 1 + :header-rows: 1 + + * - name + - desc + * - This is a reference to the code-block in the footnote: + :ref:`codeblockinfootnote` + - This is one more footnote with some code in it [#]_. + * - This is a reference to the other code block: + :ref:`codeblockinanotherfootnote` + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + * - a + - b + +.. [#] Foot note in longtable + +.. [#] Second footnote in caption of longtable + + .. code-block:: python + :caption: I am in a footnote + :name: codeblockinfootnote + + def foo(x,y): + return x+y + +.. [#] Third footnote in longtable + + .. code-block:: python + :caption: I am also in a footnote + :name: codeblockinanotherfootnote + + def bar(x,y): + return x+y + +The section with an object description +====================================== + +.. py:function:: dummy(N) + :noindex: + +Footnotes referred twice +======================== + +* Explicitly numbered footnote: [100]_ [100]_ +* Named footnote: [#twice]_ [#twice]_ + +.. [100] Numbered footnote +.. [#twice] Named footnote diff --git a/tests/roots/test-footnotes/rimg.png b/tests/roots/test-footnotes/rimg.png new file mode 100644 index 0000000..fda6cd2 Binary files /dev/null and b/tests/roots/test-footnotes/rimg.png differ -- cgit v1.2.3