Improve documentation formatting for Sphinx LaTeX environments

This commit is contained in:
jfbu 2019-04-12 19:30:31 +02:00
parent f8f4ce8bce
commit a46d4c9bca

View File

@ -783,7 +783,7 @@ Macros
multiple paragraphs in header cells of tables. multiple paragraphs in header cells of tables.
.. versionadded:: 1.6.3 .. versionadded:: 1.6.3
``\sphinxstylecodecontinued`` and ``\sphinxstylecodecontinues``. ``\sphinxstylecodecontinued`` and ``\sphinxstylecodecontinues``.
- the table of contents is typeset via ``\sphinxtableofcontents`` which is a - ``\sphinxtableofcontents``: it is a
wrapper (defined differently in :file:`sphinxhowto.cls` and in wrapper (defined differently in :file:`sphinxhowto.cls` and in
:file:`sphinxmanual.cls`) of standard ``\tableofcontents``. The macro :file:`sphinxmanual.cls`) of standard ``\tableofcontents``. The macro
``\sphinxtableofcontentshook`` is executed during its expansion right before ``\sphinxtableofcontentshook`` is executed during its expansion right before
@ -796,22 +796,22 @@ Macros
done during loading of ``'manual'`` docclass are now executed later via done during loading of ``'manual'`` docclass are now executed later via
``\sphinxtableofcontentshook``. This macro is also executed by the ``\sphinxtableofcontentshook``. This macro is also executed by the
``'howto'`` docclass, but defaults to empty with it. ``'howto'`` docclass, but defaults to empty with it.
- a custom ``\sphinxmaketitle`` is defined in the class files - ``\sphinxmaketitle``: it is defined in the class files
:file:`sphinxmanual.cls` and :file:`sphinxhowto.cls` and is used as :file:`sphinxmanual.cls` and :file:`sphinxhowto.cls` and is used as
default setting of ``'maketitle'`` :confval:`latex_elements` key. default setting of ``'maketitle'`` :confval:`latex_elements` key.
.. versionchanged:: 1.8.3 .. versionchanged:: 1.8.3
formerly, ``\maketitle`` from LaTeX document class was modified by formerly, ``\maketitle`` from LaTeX document class was modified by
Sphinx. Sphinx.
- for ``'manual'`` docclass a macro ``\sphinxbackoftitlepage``, if it is - ``\sphinxbackoftitlepage``: for ``'manual'`` docclass, and if it is
defined, gets executed at end of ``\sphinxmaketitle``, before the final defined, it gets executed at end of ``\sphinxmaketitle``, before the final
``\clearpage``. Use either the ``'maketitle'`` key or the ``'preamble'`` key ``\clearpage``. Use either the ``'maketitle'`` key or the ``'preamble'`` key
of :confval:`latex_elements` to add a custom definition of of :confval:`latex_elements` to add a custom definition of
``\sphinxbackoftitlepage``. ``\sphinxbackoftitlepage``.
.. versionadded:: 1.8.3 .. versionadded:: 1.8.3
- the citation reference is typeset via ``\sphinxcite`` which is a wrapper - ``\sphinxcite``: it is a wrapper of standard ``\cite`` for citation
of standard ``\cite``. references.
Environments Environments
~~~~~~~~~~~~ ~~~~~~~~~~~~
@ -823,12 +823,23 @@ Environments
.. versionadded:: 1.5.6 .. versionadded:: 1.5.6
formerly, the ``\small`` was hardcoded in LaTeX writer and the ending formerly, the ``\small`` was hardcoded in LaTeX writer and the ending
``\par`` was lacking. ``\par`` was lacking.
- for each admonition type ``<foo>``, the - environments associated with admonitions:
used environment is named ``sphinx<foo>``. They may be ``\renewenvironment``
- ``sphinxnote``,
- ``sphinxhint``,
- ``sphinximportant``,
- ``sphinxtip``,
- ``sphinxwarning``,
- ``sphinxcaution``,
- ``sphinxattention``,
- ``sphinxdanger``,
- ``sphinxerror``.
They may be ``\renewenvironment``
'd individually, and must then be defined with one argument (it is the heading 'd individually, and must then be defined with one argument (it is the heading
of the notice, for example ``Warning:`` for :dudir:`warning` directive, if of the notice, for example ``Warning:`` for :dudir:`warning` directive, if
English is the document language). Their default definitions use either the English is the document language). Their default definitions use either the
*sphinxheavybox* (for the first listed directives) or the *sphinxlightbox* *sphinxheavybox* (for the last 5 ones) or the *sphinxlightbox*
environments, configured to use the parameters (colours, border thickness) environments, configured to use the parameters (colours, border thickness)
specific to each type, which can be set via ``'sphinxsetup'`` string. specific to each type, which can be set via ``'sphinxsetup'`` string.