Files
sphinx/tests/roots/test-footnotes/index.rst
Jean-François B b8e0e935e4 Improve LaTeX footnotes (#3022)
Allow code-blocks in footnotes for LaTeX PDF output.

This is done via using a ``footnote environment``, provided by LaTeX
package footnotehyper which replaces old problematic package footnote.
No need to ship a custom tabulary anymore.

The footnote markers are silently removed from the table of contents and
do not end in the PDF bookmarks (the old code in ``sphinx.sty`` copying
``footmisc.sty`` was not satisfactory and has been deleted and replaced
by use of better ``\sphinxfootnotemark``.) Footnotes can be used also in
captions of literal blocks.
2016-10-15 12:09:58 +02:00

171 lines
2.9 KiB
ReStructuredText

===============
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 <http://sphinx-doc.org/>`_
* Third footnote: [#]_
* `URL including tilde <http://sphinx-doc.org/~test/>`_
* GitHub Page: `https://github.com/sphinx-doc/sphinx <https://github.com/sphinx-doc/sphinx>`_
* Mailing list: `sphinx-dev@googlegroups.com <mailto:sphinx-dev@googlegroups.com>`_
.. [AuthorYear] Author, Title, Year
.. [1] Second
.. [#] Third
The section with a reference to [#]_
=====================================
.. [#] Footnote in section
`URL in term <http://sphinx-doc.org/>`_
Description Description Description ...
Footnote in term [#]_
Description Description Description ...
`Term in deflist <http://sphinx-doc.org/>`_
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