2016-06-18 13:25:48 -05:00
|
|
|
|
LaTeX customization
|
|
|
|
|
===================
|
|
|
|
|
|
|
|
|
|
.. module:: latex
|
|
|
|
|
:synopsis: LaTeX specifics.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
.. role:: code-tex(code)
|
|
|
|
|
:language: LaTeX
|
|
|
|
|
|
2023-03-12 12:28:54 -05:00
|
|
|
|
.. _contents: https://docutils.sourceforge.io/docs/ref/rst/directives.html#table-of-contents
|
|
|
|
|
|
2016-10-29 09:30:33 -05:00
|
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
|
|
\begingroup
|
2017-02-05 13:02:19 -06:00
|
|
|
|
\sphinxsetup{%
|
2024-07-13 11:33:22 -05:00
|
|
|
|
TitleColor=DarkGoldenrod,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
pre_border-width=2pt,
|
2023-03-15 10:48:24 -05:00
|
|
|
|
pre_border-right-width=8pt,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
pre_padding=5pt,
|
|
|
|
|
pre_border-radius=5pt,
|
2024-07-13 11:33:22 -05:00
|
|
|
|
pre_background-TeXcolor=OldLace,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
pre_border-TeXcolor=Gold!90,
|
2023-03-15 10:48:24 -05:00
|
|
|
|
pre_box-shadow=6pt 6pt,
|
|
|
|
|
pre_box-shadow-TeXcolor=gray!20,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
%
|
|
|
|
|
div.warning_border-width=3pt,
|
|
|
|
|
div.warning_padding=6pt,
|
|
|
|
|
div.warning_padding-right=18pt,
|
|
|
|
|
div.warning_padding-bottom=18pt,
|
|
|
|
|
div.warning_border-TeXcolor=DarkCyan,
|
|
|
|
|
div.warning_background-TeXcolor=LightCyan,
|
|
|
|
|
div.warning_box-shadow=-12pt -12pt inset,
|
|
|
|
|
div.warning_box-shadow-TeXcolor=Cyan,
|
|
|
|
|
%
|
|
|
|
|
attentionborder=3pt,
|
|
|
|
|
attentionBorderColor=Crimson,
|
|
|
|
|
attentionBgColor=FloralWhite,
|
|
|
|
|
%
|
|
|
|
|
noteborder=1pt,
|
|
|
|
|
noteBorderColor=Olive,
|
|
|
|
|
noteBgColor=Olive!10,
|
2023-03-15 10:48:24 -05:00
|
|
|
|
div.note_border-top-width=0pt,
|
|
|
|
|
div.note_border-bottom-width=0pt,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
hintBorderColor=LightCoral,
|
|
|
|
|
}
|
2016-10-29 09:30:33 -05:00
|
|
|
|
\relax
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Unlike :ref:`the HTML builders <html-themes>`, the ``latex`` builder does not
|
|
|
|
|
benefit from prepared themes. The :ref:`latex-options`, and particularly the
|
|
|
|
|
:ref:`latex_elements <latex_elements_confval>` variable, provides much of the
|
|
|
|
|
interface for customization. For example:
|
2016-10-28 14:45:44 -05:00
|
|
|
|
|
2023-03-06 05:31:14 -06:00
|
|
|
|
.. code-block:: latex
|
2017-06-05 05:11:41 -05:00
|
|
|
|
|
|
|
|
|
# inside conf.py
|
|
|
|
|
latex_engine = 'xelatex'
|
|
|
|
|
latex_elements = {
|
2024-07-13 11:33:22 -05:00
|
|
|
|
'passoptionstopackages': r'''
|
|
|
|
|
\PassOptionsToPackage{svgnames}{xcolor}
|
|
|
|
|
''',
|
2017-06-05 05:11:41 -05:00
|
|
|
|
'fontpkg': r'''
|
|
|
|
|
\setmainfont{DejaVu Serif}
|
|
|
|
|
\setsansfont{DejaVu Sans}
|
|
|
|
|
\setmonofont{DejaVu Sans Mono}
|
|
|
|
|
''',
|
|
|
|
|
'preamble': r'''
|
|
|
|
|
\usepackage[titles]{tocloft}
|
|
|
|
|
\cftsetpnumwidth {1.25cm}\cftsetrmarg{1.5cm}
|
|
|
|
|
\setlength{\cftchapnumwidth}{0.75cm}
|
|
|
|
|
\setlength{\cftsecindent}{\cftchapnumwidth}
|
|
|
|
|
\setlength{\cftsecnumwidth}{1.25cm}
|
|
|
|
|
''',
|
2024-07-13 11:33:22 -05:00
|
|
|
|
'sphinxsetup': 'TitleColor=DarkGoldenrod',
|
2017-06-05 05:11:41 -05:00
|
|
|
|
'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
|
|
|
|
|
'printindex': r'\footnotesize\raggedright\printindex',
|
|
|
|
|
}
|
|
|
|
|
latex_show_urls = 'footnote'
|
2016-10-11 11:16:47 -05:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
Keep in mind that backslashes must be doubled in Python string literals to
|
|
|
|
|
avoid interpretation as escape sequences. Alternatively, you may use raw
|
|
|
|
|
strings as is done above.
|
2016-10-29 09:30:33 -05:00
|
|
|
|
|
2019-01-10 09:43:54 -06:00
|
|
|
|
.. _latex_elements_confval:
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
The ``latex_elements`` configuration setting
|
|
|
|
|
--------------------------------------------
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
|
|
|
|
A dictionary that contains LaTeX snippets overriding those Sphinx usually puts
|
|
|
|
|
into the generated ``.tex`` files. Its ``'sphinxsetup'`` key is described
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
:ref:`separately <latexsphinxsetup>`. It allows also local configurations
|
2023-04-06 17:11:39 -05:00
|
|
|
|
inserted in generated files, via :dudir:`raw` directives. For example, in
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
the PDF documentation this chapter is styled especially, as will be described
|
|
|
|
|
later.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Keys that you may want to override include:
|
|
|
|
|
|
|
|
|
|
``'papersize'``
|
|
|
|
|
Paper size option of the document class (``'a4paper'`` or
|
|
|
|
|
``'letterpaper'``)
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``'letterpaper'``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'pointsize'``
|
|
|
|
|
Point size option of the document class (``'10pt'``, ``'11pt'`` or
|
|
|
|
|
``'12pt'``)
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``'10pt'``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'pxunit'``
|
|
|
|
|
The value of the ``px`` when used in image attributes ``width`` and
|
|
|
|
|
``height``. The default value is ``'0.75bp'`` which achieves
|
|
|
|
|
``96px=1in`` (in TeX ``1in = 72bp = 72.27pt``.) To obtain for
|
|
|
|
|
example ``100px=1in`` use ``'0.01in'`` or ``'0.7227pt'`` (the latter
|
|
|
|
|
leads to TeX computing a more precise value, due to the smaller unit
|
|
|
|
|
used in the specification); for ``72px=1in``, simply use ``'1bp'``; for
|
|
|
|
|
``90px=1in``, use ``'0.8bp'`` or ``'0.803pt'``.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``'0.75bp'``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
``'passoptionstopackages'``
|
|
|
|
|
A string which will be positioned early in the preamble, designed to
|
2024-08-23 11:04:38 -05:00
|
|
|
|
contain :code-tex:`\\PassOptionsToPackage{options}{foo}` commands.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2021-01-21 12:51:59 -06:00
|
|
|
|
.. hint::
|
|
|
|
|
|
|
|
|
|
It may be also used for loading LaTeX packages very early in the
|
|
|
|
|
preamble. For example package ``fancybox`` is incompatible with
|
|
|
|
|
being loaded via the ``'preamble'`` key, it must be loaded earlier.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.4
|
|
|
|
|
|
|
|
|
|
``'babel'``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
"babel" package inclusion, default :code-tex:`r'\\usepackage{babel}'` (the
|
2018-10-05 04:26:22 -05:00
|
|
|
|
suitable document language string is passed as class option, and
|
|
|
|
|
``english`` is used if no language.) For Japanese documents, the
|
|
|
|
|
default is the empty string.
|
|
|
|
|
|
|
|
|
|
With XeLaTeX and LuaLaTeX, Sphinx configures the LaTeX document to use
|
|
|
|
|
`polyglossia`_, but one should be aware that current `babel`_ has
|
|
|
|
|
improved its support for Unicode engines in recent years and for some
|
|
|
|
|
languages it may make sense to prefer ``babel`` over ``polyglossia``.
|
|
|
|
|
|
|
|
|
|
.. _`polyglossia`: https://ctan.org/pkg/polyglossia
|
|
|
|
|
.. _`babel`: https://ctan.org/pkg/babel
|
|
|
|
|
|
|
|
|
|
.. hint::
|
|
|
|
|
|
2023-03-26 13:12:15 -05:00
|
|
|
|
After modifying a core LaTeX key like this one, clean up the LaTeX
|
2018-10-05 04:26:22 -05:00
|
|
|
|
build repertory before next PDF build, else left-over auxiliary
|
|
|
|
|
files are likely to break the build.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\usepackage{babel}'` (for Japanese documents)
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
|
|
|
|
For :confval:`latex_engine` set to ``'xelatex'``, the default
|
|
|
|
|
is ``'\\usepackage{polyglossia}\n\\setmainlanguage{<language>}'``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
``'lualatex'`` uses same default setting as ``'xelatex'``
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.7.6
|
2024-07-13 03:02:43 -05:00
|
|
|
|
For French with ``'xelatex'`` (not ``'lualatex'``) the default is to
|
|
|
|
|
use ``babel``, not ``polyglossia``.
|
2024-06-05 05:52:35 -05:00
|
|
|
|
|
2024-07-13 03:02:43 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
|
|
|
|
For French with ``'lualatex'`` the default is to use ``babel``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
.. _fontpkg:
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'fontpkg'``
|
2024-08-23 11:15:40 -05:00
|
|
|
|
Font package inclusion. The default with ``'pdflatex'`` is::
|
2021-01-20 09:48:35 -06:00
|
|
|
|
|
|
|
|
|
r"""\usepackage{tgtermes}
|
|
|
|
|
\usepackage{tgheros}
|
|
|
|
|
\renewcommand\ttdefault{txtt}
|
|
|
|
|
"""
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
For ``'xelatex'`` and ``'lualatex'`` on the other hand the
|
|
|
|
|
:code-tex:`\\setmainfont`, :code-tex:`\\setsansfont` and
|
|
|
|
|
:code-tex:`\\setmonofont` commands of LaTeX package ``fontspec`` (included
|
|
|
|
|
via :ref:`fontenc`) are used to set up the OpenType fonts GNU FreeSerif,
|
2024-08-25 10:07:49 -05:00
|
|
|
|
FreeSans, and FreeMono (scaled with ratio ``0.9``) as document fonts.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.2
|
|
|
|
|
Defaults to ``''`` when the :confval:`language` uses the Cyrillic
|
|
|
|
|
script.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 2.0
|
2021-01-20 09:48:35 -06:00
|
|
|
|
Incorporates some font substitution commands to help support occasional
|
|
|
|
|
Greek or Cyrillic in a document using ``'pdflatex'`` engine.
|
2024-08-23 11:15:40 -05:00
|
|
|
|
At 4.0.0 these commands were moved to the ``'fontsubstitution'`` key.
|
2021-01-20 09:48:35 -06:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 4.0.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
The default font setting was changed. As shown above it still uses
|
|
|
|
|
Times and Helvetica clones for serif and sans serif, but via better,
|
|
|
|
|
more complete TeX fonts and associated LaTeX packages. The monospace
|
|
|
|
|
font has been changed to better match the Times clone.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-25 10:07:49 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
The monospace font FreeMono used with Unicode engines is loaded at scale
|
|
|
|
|
``0.9``. This replaces the former mechanism via :ref:`fvset` which
|
|
|
|
|
configured code-blocks to use :code-tex:`\\small`. Inline literals now
|
|
|
|
|
fit better in their surrounding text, and it is easier to set up custom
|
|
|
|
|
fonts, as :ref:`fvset` does not intervene anymore by default.
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'fncychap'``
|
|
|
|
|
Inclusion of the "fncychap" package (which makes fancy chapter titles),
|
2024-08-23 11:04:38 -05:00
|
|
|
|
default :code-tex:`r'\\usepackage[Bjarne]{fncychap}'` for English documentation
|
2018-10-05 04:26:22 -05:00
|
|
|
|
(this option is slightly customized by Sphinx),
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\usepackage[Sonny]{fncychap}'` for internationalized docs (because
|
2018-10-05 04:26:22 -05:00
|
|
|
|
the "Bjarne" style uses numbers spelled out in English). Other
|
|
|
|
|
"fncychap" styles you can try are "Lenny", "Glenn", "Conny", "Rejne" and
|
|
|
|
|
"Bjornstrup". You can also set this to ``''`` to disable fncychap.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\usepackage[Bjarne]{fncychap}'` for English
|
|
|
|
|
documents, :code-tex:`r'\\usepackage[Sonny]{fncychap}'` for
|
|
|
|
|
internationalized documents, and ``''`` for Japanese documents.
|
|
|
|
|
|
|
|
|
|
.. _preamble:
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'preamble'``
|
|
|
|
|
Additional preamble content. One may move all needed macros into some file
|
|
|
|
|
:file:`mystyle.tex.txt` of the project source repertory, and get LaTeX to
|
|
|
|
|
import it at run time::
|
|
|
|
|
|
|
|
|
|
'preamble': r'\input{mystyle.tex.txt}',
|
|
|
|
|
# or, if the \ProvidesPackage LaTeX macro is used in a file mystyle.sty
|
|
|
|
|
'preamble': r'\usepackage{mystyle}',
|
|
|
|
|
|
|
|
|
|
It is then needed to set appropriately :confval:`latex_additional_files`,
|
|
|
|
|
for example:
|
|
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
|
|
latex_additional_files = ["mystyle.sty"]
|
|
|
|
|
|
2022-11-30 11:52:48 -06:00
|
|
|
|
Do not use ``.tex`` as suffix, else the file is submitted itself to the PDF
|
|
|
|
|
build process, use ``.tex.txt`` or ``.sty`` as in the examples above.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'figure_align'``
|
|
|
|
|
Latex figure float alignment. Whenever an image doesn't fit into the current
|
|
|
|
|
page, it will be 'floated' into the next page but may be preceded by any
|
|
|
|
|
other text. If you don't like this behavior, use 'H' which will disable
|
|
|
|
|
floating and position figures strictly in the order they appear in the
|
|
|
|
|
source.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``'htbp'`` (here, top, bottom, page)
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.3
|
|
|
|
|
|
|
|
|
|
``'atendofbody'``
|
|
|
|
|
Additional document content (right before the indices).
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
``'extrapackages'``
|
|
|
|
|
Additional LaTeX packages. For example:
|
|
|
|
|
|
2023-03-06 05:31:14 -06:00
|
|
|
|
.. code-block:: latex
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
latex_elements = {
|
2022-09-27 11:01:34 -05:00
|
|
|
|
'extrapackages': r'\usepackage{isodate}'
|
2018-10-05 04:26:22 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
The specified LaTeX packages will be loaded before
|
|
|
|
|
hyperref package and packages loaded from Sphinx extensions.
|
|
|
|
|
|
|
|
|
|
.. hint::
|
|
|
|
|
If you'd like to load additional LaTeX packages after hyperref, use
|
|
|
|
|
``'preamble'`` key instead.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 2.3
|
|
|
|
|
|
|
|
|
|
``'footer'``
|
|
|
|
|
Additional footer content (before the indices).
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.5
|
|
|
|
|
Use ``'atendofbody'`` key instead.
|
|
|
|
|
|
|
|
|
|
Keys that don't need to be overridden unless in special cases are:
|
|
|
|
|
|
|
|
|
|
``'extraclassoptions'``
|
|
|
|
|
The default is the empty string. Example: ``'extraclassoptions':
|
|
|
|
|
'openany'`` will allow chapters (for documents of the ``'manual'``
|
|
|
|
|
type) to start on any page.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``''``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.6
|
|
|
|
|
Added this documentation.
|
|
|
|
|
|
|
|
|
|
``'maxlistdepth'``
|
|
|
|
|
LaTeX allows by default at most 6 levels for nesting list and
|
|
|
|
|
quote-like environments, with at most 4 enumerated lists, and 4 bullet
|
|
|
|
|
lists. Setting this key for example to ``'10'`` (as a string) will
|
|
|
|
|
allow up to 10 nested levels (of all sorts). Leaving it to the empty
|
|
|
|
|
string means to obey the LaTeX default.
|
|
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
|
|
- Using this key may prove incompatible with some LaTeX packages
|
|
|
|
|
or special document classes which do their own list customization.
|
|
|
|
|
|
|
|
|
|
- The key setting is silently *ignored* if ``\usepackage{enumitem}``
|
|
|
|
|
is executed inside the document preamble. Use then rather the
|
|
|
|
|
dedicated commands of this LaTeX package.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``6``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
``'inputenc'``
|
|
|
|
|
"inputenc" package inclusion.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\usepackage[utf8]{inputenc}'` when using pdflatex, else
|
2021-06-13 05:29:39 -05:00
|
|
|
|
``''``.
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
If using ``utf8x`` in place of ``utf8`` it is mandatory to extend the
|
|
|
|
|
LaTeX preamble with suitable ``\PreloadUnicodePage{<number>}`` commands,
|
|
|
|
|
as per the ``utf8x`` documentation (``texdoc ucs`` on a TeXLive based
|
|
|
|
|
TeX installation). Else, unexpected and possibly hard-to-spot problems
|
|
|
|
|
(i.e. not causing a build crash) may arise in the PDF, in particular
|
|
|
|
|
regarding hyperlinks.
|
|
|
|
|
|
|
|
|
|
Even if these precautions are taken, PDF build via ``pdflatex`` engine
|
|
|
|
|
may crash due to upstream LaTeX not being fully compatible with
|
|
|
|
|
``utf8x``. For example, in certain circumstances related to
|
|
|
|
|
code-blocks, or attempting to include images whose filenames contain
|
|
|
|
|
Unicode characters. Indeed, starting in 2015, upstream LaTeX with
|
|
|
|
|
``pdflatex`` engine has somewhat enhanced native support for Unicode and
|
|
|
|
|
is becoming more and more incompatible with ``utf8x``. In particular,
|
|
|
|
|
since the October 2019 LaTeX release, filenames can use Unicode
|
|
|
|
|
characters, and even spaces. At Sphinx level this means e.g. that the
|
|
|
|
|
:dudir:`image` and :dudir:`figure` directives are now compatible with
|
|
|
|
|
such filenames for PDF via LaTeX output. But this is broken if
|
|
|
|
|
``utf8x`` is in use.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.4.3
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Previously :code-tex:`r'\\usepackage[utf8]{inputenc}'` was used for all
|
2018-10-05 04:26:22 -05:00
|
|
|
|
compilers.
|
|
|
|
|
|
|
|
|
|
``'cmappkg'``
|
|
|
|
|
"cmap" package inclusion.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\usepackage{cmap}'`
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.2
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
.. _fontenc:
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'fontenc'``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Its default, for ``'pdflatex'`` as :confval:`latex_engine`, is
|
|
|
|
|
:code-tex:`r'\\usepackage[T1]{fontenc}'`. Replace it (if using
|
|
|
|
|
``'pdflatex'``) with:
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`r'\\usepackage[X2,T1]{fontenc}'` if you need occasional
|
2021-01-20 09:48:35 -06:00
|
|
|
|
Cyrillic letters (физика частиц),
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`r'\\usepackage[LGR,T1]{fontenc}'` if you need occasional
|
|
|
|
|
Greek letters (Σωματιδιακή φυσική),
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`r'\\usepackage[LGR,X2,T1]{fontenc}'` if you need both.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
The TeX installation may need some extra packages. For example, on Ubuntu
|
|
|
|
|
xenial:
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- ``texlive-lang-greek`` and ``cm-super`` are needed for Greek (``LGR``),
|
2016-10-11 11:16:47 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- ``texlive-lang-cyrillic`` and ``cm-super`` are needed for Cyrillic
|
|
|
|
|
(``X2``).
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
With ``'xelatex'`` and ``'lualatex'``, support for Greek and Cyrillic is
|
|
|
|
|
out-of-the-box: this :ref:`fontenc` key defaults to including the LaTeX
|
|
|
|
|
package ``fontspec`` (with some extras described below) and selects the GNU
|
|
|
|
|
FreeSerif font as body font. See :ref:`fontpkg`.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Defaults to :code-tex:`r'\\usepackage{fontspec}'` if
|
|
|
|
|
:confval:`latex_engine` is set to ``'xelatex'``.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 1.6
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Defaults to :code-tex:`r'\\usepackage{fontspec}'` if
|
|
|
|
|
:confval:`latex_engine` is set to ``'lualatex'``.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 2.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
``'lualatex'`` executes additionally
|
|
|
|
|
:code-tex:`\\defaultfontfeatures[\\rmfamily,\\sffamily]{}` to disable TeX
|
|
|
|
|
ligatures for ``<<`` and ``>>``.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 2.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Extra LaTeX configuration is automatically executed if ``LGR``, ``T2A``,
|
|
|
|
|
or ``X2`` are detected in this key, in order to support occasional Greek
|
|
|
|
|
or Cyrillic with ``'pdflatex'``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 2.2.1
|
|
|
|
|
Documents having Greek as main language default to ``'xelatex'`` and
|
|
|
|
|
should not set the :ref:`fontenc` key, which will load ``fontspec``.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 2.3.0
|
2021-01-20 09:48:35 -06:00
|
|
|
|
``'xelatex'`` executes
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\defaultfontfeatures[\\rmfamily,\\sffamily]{}` in order to
|
|
|
|
|
avoid contractions of ``--`` into en-dash and also transforms of
|
|
|
|
|
straight quotes into curly quotes (which otherwise would happen even
|
|
|
|
|
with :confval:`smartquotes` set to ``False``).
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2021-01-20 09:48:35 -06:00
|
|
|
|
``'fontsubstitution'``
|
|
|
|
|
Ignored if ``'fontenc'`` was not configured to use ``LGR`` or ``X2`` (or
|
2024-08-25 10:07:49 -05:00
|
|
|
|
``T2A``). In case :ref:`fontpkg` key is configured for usage with some
|
2021-01-20 09:48:35 -06:00
|
|
|
|
TeX fonts known to be available in the ``LGR`` or ``X2`` encodings, set
|
|
|
|
|
this one to be the empty string. Else leave to its default.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2021-01-20 09:48:35 -06:00
|
|
|
|
Ignored with :confval:`latex_engine` other than ``'pdflatex'``.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2021-01-20 09:48:35 -06:00
|
|
|
|
.. versionadded:: 4.0.0
|
2019-10-26 04:33:59 -05:00
|
|
|
|
|
2021-01-20 09:48:35 -06:00
|
|
|
|
``'textgreek'``
|
|
|
|
|
For the support of occasional Greek letters.
|
|
|
|
|
|
|
|
|
|
It is ignored with ``'platex'``, ``'xelatex'`` or ``'lualatex'`` as
|
|
|
|
|
:confval:`latex_engine` and defaults to either the empty string or
|
2024-08-23 11:04:38 -05:00
|
|
|
|
to :code-tex:`r'\\usepackage{textalpha}'` for ``'pdflatex'`` depending on
|
2021-01-20 09:48:35 -06:00
|
|
|
|
whether the ``'fontenc'`` key was used with ``LGR`` or not. Only
|
|
|
|
|
expert LaTeX users may want to customize this key.
|
|
|
|
|
|
|
|
|
|
It can also be used as ``r'\usepackage{textalpha,alphabeta}'`` to let
|
|
|
|
|
``'pdflatex'`` support Greek Unicode input in :rst:dir:`math` context.
|
|
|
|
|
For example ``:math:`α``` (U+03B1) will render as :math:`\alpha`.
|
2019-10-26 04:33:59 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\usepackage{textalpha}'` or ``''`` if ``fontenc`` does not
|
2021-01-20 14:15:52 -06:00
|
|
|
|
include the ``LGR`` option.
|
2019-10-26 04:33:59 -05:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionadded:: 2.0
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'geometry'``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
"geometry" package inclusion, defaults to
|
|
|
|
|
:code-tex:`r'\\usepackage{geometry}'` or
|
|
|
|
|
:code-tex:`r'\\usepackage[dvipdfm]{geometry}'` for Japanese documents.
|
|
|
|
|
The Sphinx LaTeX style file executes additionally:
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-07-14 00:06:07 -05:00
|
|
|
|
.. code-block:: latex
|
2022-09-12 13:48:28 -05:00
|
|
|
|
|
|
|
|
|
\PassOptionsToPackage{hmargin=1in,vmargin=1in,marginpar=0.5in}{geometry}
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
which can be customized via corresponding :ref:`'sphinxsetup' options
|
|
|
|
|
<latexsphinxsetup>`.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5.2
|
|
|
|
|
``dvipdfm`` option if :confval:`latex_engine` is ``'platex'``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.3
|
|
|
|
|
The :ref:`'sphinxsetup' keys for the margins
|
|
|
|
|
<latexsphinxsetuphmargin>`.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5.3
|
|
|
|
|
The location in the LaTeX file has been moved to after
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\usepackage{sphinx}` and :code-tex:`\\sphinxsetup{..}`,
|
|
|
|
|
hence also after
|
2024-08-25 10:07:49 -05:00
|
|
|
|
insertion of :ref:`fontpkg` key. This is in order to handle the paper
|
2018-10-05 04:26:22 -05:00
|
|
|
|
layout options in a special way for Japanese documents: the text
|
|
|
|
|
width will be set to an integer multiple of the *zenkaku* width, and
|
|
|
|
|
the text height to an integer multiple of the baseline. See the
|
|
|
|
|
:ref:`hmargin <latexsphinxsetuphmargin>` documentation for more.
|
|
|
|
|
|
|
|
|
|
``'hyperref'``
|
|
|
|
|
"hyperref" package inclusion; also loads package "hypcap" and issues
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\urlstyle{same}`. This is done after :file:`sphinx.sty` file
|
|
|
|
|
is loaded and before executing the contents of ``'preamble'`` key.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. attention::
|
|
|
|
|
|
|
|
|
|
Loading of packages "hyperref" and "hypcap" is mandatory.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
Previously this was done from inside :file:`sphinx.sty`.
|
|
|
|
|
|
|
|
|
|
``'maketitle'``
|
|
|
|
|
"maketitle" call. Override if you want to generate a differently styled
|
|
|
|
|
title page.
|
|
|
|
|
|
|
|
|
|
.. hint::
|
|
|
|
|
|
|
|
|
|
If the key value is set to
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\newcommand\sphinxbackoftitlepage{<Extra
|
|
|
|
|
material>}\\sphinxmaketitle'`, then ``<Extra material>`` will be
|
2018-10-05 04:26:22 -05:00
|
|
|
|
typeset on back of title page (``'manual'`` docclass only).
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\sphinxmaketitle'`
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.8.3
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Original :code-tex:`\\maketitle` from document class is not overwritten,
|
2024-01-03 20:37:44 -06:00
|
|
|
|
hence is reusable as part of some custom setting for this key.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8.3
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxbackoftitlepage` optional macro. It can also be defined
|
2018-10-05 04:26:22 -05:00
|
|
|
|
inside ``'preamble'`` key rather than this one.
|
|
|
|
|
|
|
|
|
|
``'releasename'``
|
|
|
|
|
Value that prefixes ``'release'`` element on title page. As for *title* and
|
|
|
|
|
*author* used in the tuples of :confval:`latex_documents`, it is inserted as
|
|
|
|
|
LaTeX markup.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``'Release'``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'tableofcontents'``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
"tableofcontents" call. The default of
|
|
|
|
|
:code-tex:`r'\\sphinxtableofcontents'` is a wrapper of unmodified
|
|
|
|
|
:code-tex:`\\tableofcontents`, which may itself be customized by user
|
|
|
|
|
loaded packages. Override if you want to generate a different table of
|
|
|
|
|
contents or put content between the title page and the TOC.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\sphinxtableofcontents'`
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Previously the meaning of :code-tex:`\\tableofcontents` itself was
|
|
|
|
|
modified by Sphinx. This created an incompatibility with dedicated
|
|
|
|
|
packages modifying it also such as "tocloft" or "etoc".
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
``'transition'``
|
|
|
|
|
Commands used to display transitions. Override if you want to display
|
|
|
|
|
transitions differently.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`'\\n\\n\\\\bigskip\\\\hrule\\\\bigskip\\n\\n'`
|
2017-02-06 07:20:25 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionadded:: 1.2
|
2016-10-11 11:16:47 -05:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 1.6
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Remove unneeded ``{}`` formerly located after :code-tex:`\\hrule`.
|
2018-04-02 12:46:40 -05:00
|
|
|
|
|
2021-02-08 07:55:30 -06:00
|
|
|
|
``'makeindex'``
|
|
|
|
|
"makeindex" call, the last thing before ``\begin{document}``. With
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\usepackage[columns=1]{idxlayout}\\makeindex'` the index will
|
|
|
|
|
use only one column. You may have to install ``idxlayout`` LaTeX package.
|
2021-02-08 07:55:30 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\makeindex'`
|
2021-02-08 07:55:30 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'printindex'``
|
|
|
|
|
"printindex" call, the last thing in the file. Override if you want to
|
2021-02-08 07:55:30 -06:00
|
|
|
|
generate the index differently, append some content after the index, or
|
2024-08-23 11:04:38 -05:00
|
|
|
|
change the font. As LaTeX uses two-column mode for the index it is often
|
|
|
|
|
advisable to set this key to
|
|
|
|
|
:code-tex:`r'\\footnotesize\\raggedright\\printindex'`. Or, to obtain a
|
|
|
|
|
one-column index, use :code-tex:`r'\\def\\twocolumn[#1]{#1}\\printindex'`
|
|
|
|
|
(this trick may fail if using a custom document class; then try the
|
|
|
|
|
``idxlayout`` approach described in the documentation of the
|
|
|
|
|
``'makeindex'`` key).
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\printindex'`
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2024-08-25 10:07:49 -05:00
|
|
|
|
.. _fvset:
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'fvset'``
|
2021-01-20 09:48:35 -06:00
|
|
|
|
Customization of ``fancyvrb`` LaTeX package.
|
2019-09-30 04:52:34 -05:00
|
|
|
|
|
2024-08-25 10:07:49 -05:00
|
|
|
|
The default value is :code-tex:`r'\\fvset{fontsize=auto}'` which means that
|
|
|
|
|
the font size will adjust correctly if a code-block ends up in a footnote.
|
|
|
|
|
You may need to modify this when using a custom monospace font, for example
|
|
|
|
|
set it to :code-tex:`r'\\fvset{fontsize=\\small}'` if it is Courier-like
|
|
|
|
|
(for Unicode engines, it is recommended to use rather the ``Scale``
|
|
|
|
|
interface of :code-tex:`\\setmonofont` LaTeX command from ``fontspec``).
|
2021-01-20 09:48:35 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`r'\\fvset{fontsize=auto}'`
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionadded:: 1.8
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
.. versionchanged:: 2.0
|
2021-01-20 09:48:35 -06:00
|
|
|
|
For ``'xelatex'`` and ``'lualatex'`` defaults to
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\fvset{fontsize=\\small}'` as this
|
2021-01-20 09:48:35 -06:00
|
|
|
|
is adapted to the relative widths of the FreeFont family.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 4.0.0
|
2022-06-16 13:32:09 -05:00
|
|
|
|
Changed default for ``'pdflatex'``. Previously it was using
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\fvset{fontsize=\\small}'`.
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2021-07-07 10:33:48 -05:00
|
|
|
|
.. versionchanged:: 4.1.0
|
|
|
|
|
Changed default for Chinese documents to
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`r'\\fvset{fontsize=\\small,formatcom=\\xeCJKVerbAddon}'`
|
2021-07-07 10:33:48 -05:00
|
|
|
|
|
2024-08-25 10:07:49 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
Changed default for ``'xelatex'`` and ``'lualatex'`` to be also
|
|
|
|
|
:code-tex:`r'\\fvset{fontsize=auto}'`. The rescaling for default
|
|
|
|
|
monospace font FreeMono is now set via the LaTeX package ``fontspec``
|
|
|
|
|
interface rather. See :ref:`fontpkg`.
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Keys that are set by other options and therefore should not be overridden are:
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``'docclass'``
|
|
|
|
|
``'classoptions'``
|
|
|
|
|
``'title'``
|
|
|
|
|
``'release'``
|
|
|
|
|
``'author'``
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _latexsphinxsetup:
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
The ``sphinxsetup`` configuration setting
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
2019-01-10 09:43:54 -06:00
|
|
|
|
|
|
|
|
|
The ``'sphinxsetup'`` key of :ref:`latex_elements <latex_elements_confval>`
|
|
|
|
|
provides a LaTeX-type customization interface::
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
latex_elements = {
|
|
|
|
|
'sphinxsetup': 'key1=value1, key2=value2, ...',
|
|
|
|
|
}
|
2016-10-29 07:03:12 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
LaTeX syntax for boolean keys requires *lowercase* ``true`` or ``false``
|
|
|
|
|
e.g ``'sphinxsetup': "verbatimwrapslines=false"``. If setting a
|
|
|
|
|
boolean key to ``true``, ``=true`` is optional.
|
|
|
|
|
Spaces around the commas and equal signs are ignored, spaces inside LaTeX
|
|
|
|
|
macros may be significant.
|
|
|
|
|
Do not use ticks/quotes to enclose string or numerical values.
|
|
|
|
|
|
|
|
|
|
The ``'sphinxsetup'`` defaults to empty.
|
|
|
|
|
If non-empty, it will be passed as argument to the
|
2019-01-10 09:43:54 -06:00
|
|
|
|
``\sphinxsetup`` macro inside the document preamble, like this::
|
2017-06-05 05:11:41 -05:00
|
|
|
|
|
|
|
|
|
\usepackage{sphinx}
|
|
|
|
|
\sphinxsetup{key1=value1, key2=value2,...}
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2023-03-20 04:33:54 -05:00
|
|
|
|
It is possible to insert uses of the ``\sphinxsetup`` LaTeX macro directly
|
2024-07-13 11:33:22 -05:00
|
|
|
|
into the body of the document, via the ``raw`` directive:
|
2016-10-29 09:30:33 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
.. code-block:: latex
|
|
|
|
|
|
|
|
|
|
.. raw:: latex
|
2016-10-28 14:45:44 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
\begingroup
|
|
|
|
|
\sphinxsetup{%
|
2024-07-13 11:33:22 -05:00
|
|
|
|
TitleColor=DarkGoldenrod,
|
|
|
|
|
... more comma separated key=value using LaTeX syntax ...
|
2023-03-12 05:28:36 -05:00
|
|
|
|
}
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
All elements here will be under the influence of the raw ``\sphinxsetup``
|
|
|
|
|
settings.
|
2016-10-29 17:08:17 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
|
|
\endgroup
|
2017-01-16 08:15:07 -06:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
From here on, the raw ``\sphinxsetup`` has no effect anymore.
|
|
|
|
|
|
|
|
|
|
This is the technique which has been used to style especially the present part
|
|
|
|
|
of the documentation for the PDF output. The actually used options will be
|
|
|
|
|
found at top of :file:`doc/latex.rst` at the `development repository`_.
|
|
|
|
|
|
|
|
|
|
.. _development repository: https://github.com/sphinx-doc/sphinx
|
|
|
|
|
|
|
|
|
|
The color used in the above example is available from having passed the
|
|
|
|
|
``svgnames`` option to the "xcolor" package::
|
|
|
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
|
'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
|
|
|
|
|
}
|
2021-02-18 05:47:14 -06:00
|
|
|
|
|
|
|
|
|
``bookmarksdepth``
|
2021-09-07 19:15:25 -05:00
|
|
|
|
Controls the depth of the collapsible bookmarks panel in the PDF.
|
2021-02-18 05:47:14 -06:00
|
|
|
|
May be either a number (e.g. ``3``) or a LaTeX sectioning name (e.g.
|
|
|
|
|
``subsubsection``, i.e. without backslash).
|
|
|
|
|
For details, refer to the ``hyperref`` LaTeX docs.
|
|
|
|
|
|
|
|
|
|
Default: ``5``
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 4.0.0
|
2017-01-16 08:15:07 -06:00
|
|
|
|
|
2017-02-06 07:20:25 -06:00
|
|
|
|
.. _latexsphinxsetuphmargin:
|
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
``hmargin, vmargin``
|
|
|
|
|
The dimensions of the horizontal (resp. vertical) margins, passed as
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``hmargin`` (resp. ``vmargin``) option to the ``geometry`` package.
|
|
|
|
|
Example::
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
|
|
|
|
'sphinxsetup': 'hmargin={2in,1.5in}, vmargin={1.5in,2in}, marginpar=1in',
|
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
Japanese documents currently accept only the one-dimension format for
|
|
|
|
|
these parameters. The ``geometry`` package is then passed suitable options
|
|
|
|
|
to get the text width set to an exact multiple of the *zenkaku* width, and
|
|
|
|
|
the text height set to an integer multiple of the baselineskip, with the
|
|
|
|
|
closest fit for the margins.
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``1in`` (equivalent to ``{1in,1in}``)
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2017-02-06 06:55:25 -06:00
|
|
|
|
.. hint::
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
For Japanese ``'manual'`` docclass with pointsize ``11pt`` or ``12pt``,
|
|
|
|
|
use the ``nomag`` extra document class option (cf.
|
|
|
|
|
``'extraclassoptions'`` key of :confval:`latex_elements`) or so-called
|
2017-06-05 12:42:47 -05:00
|
|
|
|
TeX "true" units::
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
2017-02-05 13:02:19 -06:00
|
|
|
|
'sphinxsetup': 'hmargin=1.5truein, vmargin=1.5truein, marginpar=5zw',
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.3
|
|
|
|
|
|
|
|
|
|
``marginpar``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
The :code-tex:`\\marginparwidth` LaTeX dimension. For Japanese documents,
|
|
|
|
|
the value is modified to be the closest integer multiple of the *zenkaku*
|
|
|
|
|
width.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``0.5in``
|
2017-02-03 17:00:05 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.3
|
|
|
|
|
|
2024-08-18 14:34:20 -05:00
|
|
|
|
``mathnumsep``
|
|
|
|
|
This defaults to the string (without quotes!) as set by
|
|
|
|
|
:confval:`math_numsep` (which itself defaults to ``'.'``). Use it if
|
|
|
|
|
a different setting is needed for LaTeX output.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 8.1.0
|
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
``verbatimwithframe``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Boolean to specify if :rst:dir:`code-block`\ s and literal includes are
|
|
|
|
|
framed. Setting it to ``false`` does not deactivate use of package
|
2023-03-12 05:28:36 -05:00
|
|
|
|
"framed", because it is still in use for the optional background color.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``true``.
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``verbatimwrapslines``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Boolean to specify if long lines in :rst:dir:`code-block`\ 's contents are
|
|
|
|
|
wrapped.
|
|
|
|
|
|
2021-02-09 05:03:55 -06:00
|
|
|
|
If ``true``, line breaks may happen at spaces (the last space before the
|
2024-07-10 15:43:14 -05:00
|
|
|
|
line break will be rendered using a special symbol), and at ASCII
|
2021-02-09 05:03:55 -06:00
|
|
|
|
punctuation characters (i.e. not at letters or digits). Whenever a long
|
|
|
|
|
string has no break points, it is moved to next line. If its length is
|
|
|
|
|
longer than the line width it will overflow.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``true``
|
2016-10-29 07:03:12 -05:00
|
|
|
|
|
2021-02-09 08:47:15 -06:00
|
|
|
|
.. _latexsphinxsetupforcewraps:
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2021-02-08 16:13:46 -06:00
|
|
|
|
``verbatimforcewraps``
|
|
|
|
|
Boolean to specify if long lines in :rst:dir:`code-block`\ 's contents
|
2021-02-09 05:03:55 -06:00
|
|
|
|
should be forcefully wrapped to never overflow due to long strings.
|
2017-06-16 07:24:40 -05:00
|
|
|
|
|
2021-02-09 05:28:03 -06:00
|
|
|
|
.. note::
|
2021-02-09 05:03:55 -06:00
|
|
|
|
|
|
|
|
|
It is assumed that the Pygments_ LaTeXFormatter has not been used with
|
|
|
|
|
its ``texcomments`` or similar options which allow additional
|
|
|
|
|
(arbitrary) LaTeX mark-up.
|
|
|
|
|
|
|
|
|
|
Also, in case of :confval:`latex_engine` set to ``'pdflatex'``, only
|
|
|
|
|
the default LaTeX handling of Unicode code points, i.e. ``utf8`` not
|
|
|
|
|
``utf8x`` is allowed.
|
2021-02-08 16:13:46 -06:00
|
|
|
|
|
2021-02-09 05:33:16 -06:00
|
|
|
|
.. _Pygments: https://pygments.org/
|
|
|
|
|
|
2021-02-08 16:13:46 -06:00
|
|
|
|
Default: ``false``
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.5.0
|
|
|
|
|
|
2021-02-09 05:03:55 -06:00
|
|
|
|
``verbatimmaxoverfull``
|
|
|
|
|
A number. If an unbreakable long string has length larger than the total
|
|
|
|
|
linewidth plus this number of characters, and if ``verbatimforcewraps``
|
|
|
|
|
mode is on, the input line will be reset using the forceful algorithm
|
|
|
|
|
which applies breakpoints at each character.
|
|
|
|
|
|
|
|
|
|
Default: ``3``
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.5.0
|
|
|
|
|
|
|
|
|
|
``verbatimmaxunderfull``
|
|
|
|
|
A number. If ``verbatimforcewraps`` mode applies, and if after applying
|
|
|
|
|
the line wrapping at spaces and punctuation, the first part of the split
|
|
|
|
|
line is lacking at least that number of characters to fill the available
|
|
|
|
|
width, then the input line will be reset using the forceful algorithm.
|
|
|
|
|
|
|
|
|
|
As the default is set to a high value, the forceful algorithm is triggered
|
|
|
|
|
only in overfull case, i.e. in presence of a string longer than full
|
|
|
|
|
linewidth. Set this to ``0`` to force all input lines to be hard wrapped
|
2021-07-07 11:29:38 -05:00
|
|
|
|
at the current available linewidth::
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2021-02-09 05:03:55 -06:00
|
|
|
|
latex_elements = {
|
|
|
|
|
'sphinxsetup': "verbatimforcewraps, verbatimmaxunderfull=0",
|
|
|
|
|
}
|
2017-06-16 07:24:40 -05:00
|
|
|
|
|
2021-02-09 05:03:55 -06:00
|
|
|
|
This can be done locally for a given code-block via the use of raw latex
|
2021-02-09 08:47:15 -06:00
|
|
|
|
directives to insert suitable ``\sphinxsetup`` (before and after) into the
|
|
|
|
|
latex file.
|
2021-02-09 05:03:55 -06:00
|
|
|
|
|
|
|
|
|
Default: ``100``
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.5.0
|
2017-06-16 07:24:40 -05:00
|
|
|
|
|
2017-05-23 08:58:03 -05:00
|
|
|
|
``verbatimhintsturnover``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Boolean to specify if code-blocks display "continued on next page" and
|
2023-03-12 12:28:54 -05:00
|
|
|
|
"continued from previous page" hints in case of page breaks.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``true``
|
2017-05-23 08:58:03 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6.3
|
2017-06-16 07:24:40 -05:00
|
|
|
|
.. versionchanged:: 1.7
|
|
|
|
|
the default changed from ``false`` to ``true``.
|
|
|
|
|
|
|
|
|
|
``verbatimcontinuedalign``, ``verbatimcontinuesalign``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Horizontal position relative to the framed contents: either ``l`` (left
|
|
|
|
|
aligned), ``r`` (right aligned) or ``c`` (centered).
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``r``
|
2017-06-16 07:24:40 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.7
|
2017-05-23 08:58:03 -05:00
|
|
|
|
|
2017-01-14 05:32:20 -06:00
|
|
|
|
``parsedliteralwraps``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Boolean to specify if long lines in :dudir:`parsed-literal`\ 's contents
|
|
|
|
|
should wrap.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``true``
|
2017-01-14 05:32:20 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.2
|
2023-03-12 05:28:36 -05:00
|
|
|
|
set this option value to ``false`` to recover former behavior.
|
2017-01-14 05:32:20 -06:00
|
|
|
|
|
2016-11-05 10:43:13 -05:00
|
|
|
|
``inlineliteralwraps``
|
2020-05-30 09:22:57 -05:00
|
|
|
|
Boolean to specify if line breaks are allowed inside inline literals: but
|
2018-10-05 04:26:22 -05:00
|
|
|
|
extra potential break-points (additionally to those allowed by LaTeX at
|
|
|
|
|
spaces or for hyphenation) are currently inserted only after the characters
|
2019-11-06 11:42:52 -06:00
|
|
|
|
``. , ; ? ! /`` and ``\``. Due to TeX internals, white space in the line
|
2018-10-05 04:26:22 -05:00
|
|
|
|
will be stretched (or shrunk) in order to accommodate the linebreak.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``true``
|
2016-11-05 10:43:13 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
2023-03-12 05:28:36 -05:00
|
|
|
|
set this option value to ``false`` to recover former behavior.
|
2016-11-05 10:43:13 -05:00
|
|
|
|
|
2019-11-06 11:42:52 -06:00
|
|
|
|
.. versionchanged:: 2.3.0
|
|
|
|
|
added potential breakpoint at ``\`` characters.
|
|
|
|
|
|
2016-10-28 14:45:44 -05:00
|
|
|
|
``verbatimvisiblespace``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
When a long code line is split, the last space character from the source
|
|
|
|
|
code line right before the linebreak location is typeset using this.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``\textcolor{red}{\textvisiblespace}``
|
2016-10-28 14:45:44 -05:00
|
|
|
|
|
|
|
|
|
``verbatimcontinued``
|
2017-06-05 05:11:41 -05:00
|
|
|
|
A LaTeX macro inserted at start of continuation code lines. Its
|
2024-08-23 11:04:38 -05:00
|
|
|
|
(complicated...) default typesets a small red hook pointing to the right:
|
|
|
|
|
|
|
|
|
|
.. code-block:: latex
|
2016-10-29 07:03:12 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
\makebox[2\fontcharwd\font`\x][r]{\textcolor{red}{\tiny$\hookrightarrow$}}
|
2016-10-29 07:03:12 -05:00
|
|
|
|
|
2016-10-28 14:45:44 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
2017-06-05 05:11:41 -05:00
|
|
|
|
The breaking of long code lines was added at 1.4.2. The default
|
2021-07-07 11:29:38 -05:00
|
|
|
|
definition of the continuation symbol was changed at 1.5 to accommodate
|
2017-06-05 05:11:41 -05:00
|
|
|
|
various font sizes (e.g. code-blocks can be in footnotes).
|
2016-10-28 14:45:44 -05:00
|
|
|
|
|
2022-10-12 10:15:40 -05:00
|
|
|
|
.. note::
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Values for color keys must either:
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- obey the syntax of the :code-tex:`\\definecolor` LaTeX command, e.g. something
|
2022-10-12 10:15:40 -05:00
|
|
|
|
such as ``VerbatimColor={rgb}{0.2,0.3,0.5}`` or ``{RGB}{37,23,255}`` or
|
2024-07-13 11:33:22 -05:00
|
|
|
|
``{gray}{0.75}`` or ``{HTML}{808080}`` or
|
2022-10-12 10:15:40 -05:00
|
|
|
|
...
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- or obey the syntax of the :code-tex:`\\colorlet` command from package ``xcolor``
|
2022-10-12 10:15:40 -05:00
|
|
|
|
e.g. ``VerbatimColor=red!10`` or ``red!50!green`` or ``-red!75`` or
|
2023-03-12 05:28:36 -05:00
|
|
|
|
``MyPreviouslyDefinedColor`` or... Refer to xcolor_ documentation for
|
2022-10-12 10:15:40 -05:00
|
|
|
|
this syntax.
|
|
|
|
|
|
|
|
|
|
.. _xcolor: https://ctan.org/pkg/xcolor
|
|
|
|
|
|
2022-10-12 10:41:39 -05:00
|
|
|
|
.. versionchanged:: 5.3.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Formerly only the :code-tex:`\\definecolor` syntax was accepted.
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
``TitleColor``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
The color for titles (as configured via use of package "titlesec".)
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``{rgb}{0.126,0.263,0.361}``
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
``InnerLinkColor``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
A color passed to ``hyperref`` as value of ``linkcolor`` and
|
2018-10-05 04:26:22 -05:00
|
|
|
|
``citecolor``.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``{rgb}{0.208,0.374,0.486}``.
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``OuterLinkColor``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
A color passed to ``hyperref`` as value of ``filecolor``, ``menucolor``,
|
2018-10-05 04:26:22 -05:00
|
|
|
|
and ``urlcolor``.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``{rgb}{0.216,0.439,0.388}``
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``VerbatimColor``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
The background color for :rst:dir:`code-block`\ s.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
Default: ``{RGB}{242,242,242}`` (same as ``{gray}{0.95}``).
|
2022-10-17 04:19:25 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 6.0.0
|
|
|
|
|
|
|
|
|
|
Formerly, it was ``{rgb}{1,1,1}`` (white).
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``VerbatimBorderColor``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
The frame color.
|
|
|
|
|
|
2022-10-17 04:19:25 -05:00
|
|
|
|
Default: ``{RGB}{32,32,32}``
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 6.0.0
|
|
|
|
|
|
|
|
|
|
Formerly it was ``{rgb}{0,0,0}`` (black).
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-12-10 05:16:35 -06:00
|
|
|
|
``VerbatimHighlightColor``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
The color for highlighted lines.
|
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``{rgb}{0.878,1,1}``
|
2017-12-10 05:16:35 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6.6
|
|
|
|
|
|
2022-10-12 10:15:40 -05:00
|
|
|
|
.. _tablecolors:
|
|
|
|
|
|
|
|
|
|
``TableRowColorHeader``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Sets the background color for (all) the header rows of tables.
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
|
|
|
|
It will have an effect only if either the :confval:`latex_table_style`
|
|
|
|
|
contains ``'colorrows'`` or if the table is assigned the ``colorrows``
|
|
|
|
|
class. It is ignored for tables with ``nocolorrows`` class.
|
2017-12-11 16:09:19 -06:00
|
|
|
|
|
2022-10-12 10:15:40 -05:00
|
|
|
|
As for the other ``'sphinxsetup'`` keys, it can also be set or modified
|
2024-08-23 11:04:38 -05:00
|
|
|
|
from a :code-tex:`\\sphinxsetup{...}` LaTeX command inserted via the
|
|
|
|
|
:dudir:`raw` directive, or also from a LaTeX environment associated to a
|
|
|
|
|
`container class <latexcontainer_>`_ and using such
|
|
|
|
|
:code-tex:`\\sphinxsetup{...}`.
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
|
|
|
|
Default: ``{gray}{0.86}``
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
There is also ``TableMergeColorHeader``. If used, sets a specific color
|
2022-10-12 10:15:40 -05:00
|
|
|
|
for merged single-row cells in the header.
|
|
|
|
|
|
2022-10-12 10:41:39 -05:00
|
|
|
|
.. versionadded:: 5.3.0
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
|
|
|
|
``TableRowColorOdd``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Sets the background color for odd rows in tables (the row count starts at
|
2022-10-12 10:15:40 -05:00
|
|
|
|
``1`` at the first non-header row). Has an effect only if the
|
|
|
|
|
:confval:`latex_table_style` contains ``'colorrows'`` or for specific
|
|
|
|
|
tables assigned the ``colorrows`` class.
|
|
|
|
|
|
|
|
|
|
Default: ``{gray}{0.92}``
|
|
|
|
|
|
|
|
|
|
There is also ``TableMergeColorOdd``.
|
|
|
|
|
|
2022-10-12 10:41:39 -05:00
|
|
|
|
.. versionadded:: 5.3.0
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
|
|
|
|
``TableRowColorEven``
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Sets the background color for even rows in tables.
|
2022-10-12 10:15:40 -05:00
|
|
|
|
|
|
|
|
|
Default ``{gray}{0.98}``
|
|
|
|
|
|
|
|
|
|
There is also ``TableMergeColorEven``.
|
|
|
|
|
|
2022-10-12 10:41:39 -05:00
|
|
|
|
.. versionadded:: 5.3.0
|
2017-12-11 16:09:19 -06:00
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
``verbatimsep``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
The separation between code lines and the frame.
|
|
|
|
|
|
2023-01-06 16:52:19 -06:00
|
|
|
|
See :ref:`additionalcss` for its alias ``pre_padding`` and
|
|
|
|
|
additional keys.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`\\fboxsep`
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``verbatimborder``
|
2023-01-06 16:52:19 -06:00
|
|
|
|
The width of the frame around :rst:dir:`code-block`\ s. See also
|
|
|
|
|
:ref:`additionalcss` for ``pre_border-width``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`\\fboxrule`
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. important::
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
Since 8.1.0 it is possible to style separately the :dudir:`topic`,
|
|
|
|
|
contents_, and :dudir:`sidebar` directives, and their defaults differ.
|
|
|
|
|
See :ref:`additionalcss`. The next three keys are kept as legacy
|
|
|
|
|
interface not distinguishing between the three directives.
|
2023-01-06 16:52:19 -06:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
``shadowsep``
|
|
|
|
|
This legacy option sets the padding (same in all directions) simultaneously
|
|
|
|
|
for the :dudir:`topic`, contents_, and :dudir:`sidebar` directives.
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``shadowsize``
|
2024-08-19 13:43:47 -05:00
|
|
|
|
This legacy option sets the shadow width simultaneously for the
|
|
|
|
|
:dudir:`topic`, contents_, and :dudir:`sidebar` directives.
|
2023-01-06 16:52:19 -06:00
|
|
|
|
|
2016-10-27 13:24:33 -05:00
|
|
|
|
``shadowrule``
|
2024-08-19 13:43:47 -05:00
|
|
|
|
This legacy option sets the border-width (same on all sides) simultaneously
|
|
|
|
|
for the :dudir:`topic`, contents_, and :dudir:`sidebar` directives.
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. important::
|
|
|
|
|
|
|
|
|
|
At 7.4.0 all admonitions (not only danger-type) use the possibilities
|
|
|
|
|
which were added at 5.1.0 and 6.2.0. All defaults have changed.
|
|
|
|
|
|
|
|
|
|
``iconpackage``
|
|
|
|
|
|
|
|
|
|
The name of the LaTeX package used for icons in the admonition titles. It
|
|
|
|
|
defaults to ``fontawesome5`` or to fall-back ``fontawesome``. In case
|
|
|
|
|
neither one is available the option value will automatically default to
|
|
|
|
|
``none``, which means that no attempt at loading a package is done.
|
|
|
|
|
Independently of this setting, arbitrary LaTeX code can be associated to
|
|
|
|
|
each admonition type via ``div.<type>_icon-title`` keys which are
|
|
|
|
|
described in the :ref:`additionalcss` section. If these keys are not
|
|
|
|
|
used, Sphinx will either apply its default choices of icons (if
|
|
|
|
|
``fontawesome{5,}`` is available) or not draw the icon at all. Notice that
|
|
|
|
|
if fall-back ``fontawesome`` is used the common icon for :dudir:`caution`
|
|
|
|
|
and :dudir:`danger` will default to "bolt" not "radiation", which is only
|
|
|
|
|
found in ``fontawesome5``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 7.4.0
|
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|notebdcolors|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The color for the admonition border.
|
|
|
|
|
|
|
|
|
|
Default: ``{RGB}{134,152,155}``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
2016-10-29 07:03:12 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|notebgcolors|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The color for the admonition background.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
Default: ``{RGB}{247,247,247}``.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.2.0
|
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|notetextcolors|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The color for the admonition contents.
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
Default: unset (contents text uses ambient text color, a priori black)
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.2.0
|
|
|
|
|
|
|
|
|
|
To be considered experimental until 7.0.0. These options have aliases
|
|
|
|
|
``div.note_TeXcolor`` (etc) described in :ref:`additionalcss`. Using
|
|
|
|
|
the latter will let Sphinx switch to a more complex LaTeX code,
|
|
|
|
|
which supports the customizability described in :ref:`additionalcss`.
|
|
|
|
|
|
|
|
|
|
|notetexextras|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Some extra LaTeX code (such as :code-tex:`\\bfseries` or
|
|
|
|
|
:code-tex:`\\footnotesize`) to be executed at start of the contents.
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
|
|
|
|
Default: empty
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.2.0
|
|
|
|
|
|
|
|
|
|
To be considered experimental until 7.0.0. These options have aliases
|
|
|
|
|
``div.note_TeXextras`` (etc) described in :ref:`additionalcss`.
|
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
``noteborder``, ``hintborder``, ``importantborder``, ``tipborder``
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The width of the border. See
|
|
|
|
|
:ref:`additionalcss` for keys allowing to configure separately each
|
|
|
|
|
border width.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2020-05-30 09:42:46 -05:00
|
|
|
|
Default: ``0.5pt``
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
.. only:: not latex
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|warningbdcolors|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The color for the admonition border.
|
|
|
|
|
|
|
|
|
|
Default: ``{RGB}{148,0,0}`` except for ``error`` which uses ``red``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
.. only:: latex
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|wgbdcolorslatex|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The color for the admonition border.
|
|
|
|
|
|
|
|
|
|
Default: ``{RGB}{148,0,0}`` except for ``error`` which uses ``red``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|warningbgcolors|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The background color for the admonition background.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
Default: ``{RGB}{247,247,247}``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 7.4.0
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|warningborders|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The width of the admonition frame. See
|
2023-01-06 16:52:19 -06:00
|
|
|
|
:ref:`additionalcss` for keys allowing to configure separately each
|
|
|
|
|
border width.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
Default: ``1pt`` except for ``error`` which uses ``1.25pt``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 7.4.0
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``AtStartFootnote``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
LaTeX macros inserted at the start of the footnote text at bottom of page,
|
|
|
|
|
after the footnote number.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`\\mbox{ }`
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
``BeforeFootnote``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
LaTeX macros inserted before the footnote mark. The default removes
|
|
|
|
|
possible space before it (else, TeX could insert a line break there).
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Default: :code-tex:`\\leavevmode\\unskip`
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5
|
|
|
|
|
|
|
|
|
|
``HeaderFamily``
|
2024-08-23 11:04:38 -05:00
|
|
|
|
default :code-tex:`\\sffamily\\bfseries`. Sets the font used by headings.
|
2016-10-29 09:30:33 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|
|
|
|
|
.. |notebdcolors| replace:: ``noteBorderColor``, ``hintBorderColor``,
|
|
|
|
|
``importantBorderColor``, ``tipBorderColor``
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
.. |notebgcolors| replace:: ``noteBgColor``, ``hintBgColor``,
|
|
|
|
|
``importantBgColor``, ``tipBgColor``
|
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
.. |notetextcolors| replace:: ``noteTextColor``, ``hintTextColor``,
|
2023-03-19 13:09:08 -05:00
|
|
|
|
``importantTextColor``, ``tipTextColor``
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
|
|
|
|
.. |notetexextras| replace:: ``noteTeXextras``, ``hintTeXextras``,
|
2023-03-19 13:09:08 -05:00
|
|
|
|
``importantTeXextras``, ``tipTeXextras``
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
2017-06-05 09:30:14 -05:00
|
|
|
|
.. |warningbdcolors| replace:: ``warningBorderColor``, ``cautionBorderColor``,
|
|
|
|
|
``attentionBorderColor``, ``dangerBorderColor``,
|
|
|
|
|
``errorBorderColor``
|
|
|
|
|
|
2022-06-16 13:32:09 -05:00
|
|
|
|
.. |wgbdcolorslatex| replace:: ``warningBorderColor``, and
|
2021-02-09 11:11:24 -06:00
|
|
|
|
``(caution|attention|danger|error)BorderColor``
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|
|
|
|
|
.. else latex goes into right margin, as it does not hyphenate the names
|
|
|
|
|
|
|
|
|
|
.. |warningbgcolors| replace:: ``warningBgColor``, ``cautionBgColor``,
|
|
|
|
|
``attentionBgColor``, ``dangerBgColor``,
|
|
|
|
|
``errorBgColor``
|
|
|
|
|
|
2018-12-11 07:06:48 -06:00
|
|
|
|
.. |warningborders| replace:: ``warningborder``, ``cautionborder``,
|
|
|
|
|
``attentionborder``, ``dangerborder``,
|
|
|
|
|
``errorborder``
|
2017-06-05 09:30:14 -05:00
|
|
|
|
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
.. _additionalcss:
|
|
|
|
|
|
|
|
|
|
Additional CSS-like ``'sphinxsetup'`` keys
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 5.1.0
|
|
|
|
|
|
2023-03-12 12:28:54 -05:00
|
|
|
|
For :rst:dir:`code-block`, :dudir:`topic` and contents_ directive,
|
2023-03-12 05:28:36 -05:00
|
|
|
|
and strong-type admonitions (:dudir:`warning`, :dudir:`error`, ...).
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
.. versionadded:: 6.2.0
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Also the :dudir:`note`, :dudir:`hint`, :dudir:`important` and :dudir:`tip`
|
|
|
|
|
admonitions can be styled this way. Using for them *any* of the listed
|
|
|
|
|
options will trigger usage of a more complex LaTeX code than the one used
|
|
|
|
|
per default (``sphinxheavybox`` vs ``sphinxlightbox``). Setting the new
|
|
|
|
|
``noteBgColor`` (or ``hintBgColor``, ...) also triggers usage of
|
|
|
|
|
``sphinxheavybox`` for :dudir:`note` (or :dudir:`hint`, ...).
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionadded:: 7.4.0
|
|
|
|
|
|
|
|
|
|
For *all* admonition types, the default configuration does set a background
|
|
|
|
|
color (hence the richer ``sphinxheavybox`` is always used).
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
|
|
|
|
Further, all admonition titles are by default styled using a colored row
|
|
|
|
|
and an icon, which are modeled on the current rendering of Sphinx own
|
|
|
|
|
docs at https://www.sphinx-doc.org. CSS-named alike keys are added to
|
|
|
|
|
set the foreground and background colors for the title as well as the
|
|
|
|
|
LaTeX code for the icon.
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionadded:: 7.4.0
|
|
|
|
|
Customizability of the :rst:dir:`seealso` and
|
|
|
|
|
:rst:dir:`todo` directives.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 8.1.0
|
|
|
|
|
Separate customizability and new defaults for the
|
|
|
|
|
:dudir:`topic`, contents_, and :dudir:`sidebar` directives.
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
2023-03-12 12:28:54 -05:00
|
|
|
|
Perhaps in future these 5.1.0 (and 6.2.0) novel settings will be optionally
|
|
|
|
|
imported from some genuine CSS external file, but currently they have to be used
|
2024-08-23 11:04:38 -05:00
|
|
|
|
via the ``'sphinxsetup'`` interface (or the :code-tex:`\\sphinxsetup` LaTeX command
|
2023-03-12 12:28:54 -05:00
|
|
|
|
inserted via the :dudir:`raw` directive) and the CSS syntax is only imitated.
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
|
|
|
|
.. important:: Low-level LaTeX errors causing a build failure can happen if
|
2023-03-12 05:28:36 -05:00
|
|
|
|
the input syntax is not respected.
|
|
|
|
|
|
2023-03-13 06:25:47 -05:00
|
|
|
|
* In particular colors must be input as for the other color related options
|
2024-08-23 11:04:38 -05:00
|
|
|
|
previously described, i.e. either in the :code-tex:`\\definecolor` syntax
|
|
|
|
|
or via the :code-tex:`\\colorlet` syntax::
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
|
|
|
|
...<other options>
|
2024-07-13 11:33:22 -05:00
|
|
|
|
div.warning_border-TeXcolor={rgb}{1,0,0},% \definecolor syntax
|
|
|
|
|
div.error_background-TeXcolor=red!10,% \colorlet syntax
|
2023-03-12 05:28:36 -05:00
|
|
|
|
...<other options>
|
|
|
|
|
|
2023-03-13 06:25:47 -05:00
|
|
|
|
* A colon in place of the equal sign will break LaTeX.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2023-03-19 14:17:51 -05:00
|
|
|
|
* ``...border-width`` or ``...padding`` expect a *single* dimension: they can not
|
|
|
|
|
be used so far with space separated dimensions.
|
2023-03-13 06:25:47 -05:00
|
|
|
|
|
2023-03-19 14:17:51 -05:00
|
|
|
|
* ``...top-right-radius`` et al. values may be either a single or *two* space
|
|
|
|
|
separated dimensions.
|
|
|
|
|
|
2023-03-13 06:25:47 -05:00
|
|
|
|
* Dimension specifications must use TeX units such as ``pt`` or ``cm`` or
|
|
|
|
|
``in``. The ``px`` unit is recognized by ``pdflatex`` and ``lualatex``
|
|
|
|
|
but not by ``xelatex`` or ``platex``.
|
|
|
|
|
|
|
|
|
|
* It is allowed for such specifications to be so-called "dimensional
|
2024-08-23 11:04:38 -05:00
|
|
|
|
expressions", e.g. :code-tex:`\\fboxsep+2pt` or
|
|
|
|
|
:code-tex:`0.5\\baselineskip` are valid inputs. The expressions will be
|
|
|
|
|
evaluated only at the typesetting time. Be careful though if using as in
|
|
|
|
|
these examples TeX control sequences to double the backslash or to employ
|
|
|
|
|
a raw Python string for the value of the :ref:`'sphinxsetup'
|
|
|
|
|
<latexsphinxsetup>` key.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2023-03-19 14:17:51 -05:00
|
|
|
|
* As a rule, avoid inserting unneeded spaces in the key values: especially
|
2024-08-23 11:04:38 -05:00
|
|
|
|
for the radii an input such ``2 pt 3pt`` will break LaTeX. Beware also
|
|
|
|
|
that :code-tex:`\\fboxsep \\fboxsep` will not be seen as space separated
|
|
|
|
|
in LaTeX. You must use something such as ``{\fboxsep} \fboxsep``. Or
|
|
|
|
|
use directly ``3pt 3pt`` which is a priori equivalent and simpler.
|
2023-03-19 14:17:51 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
The options are all named in a similar pattern which depends on a ``prefix``,
|
2023-03-13 06:25:47 -05:00
|
|
|
|
which is then followed by an underscore, then the property name.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
|
|
|
|
.. csv-table::
|
|
|
|
|
:header: Directive, Option prefix, LaTeX environment
|
|
|
|
|
|
|
|
|
|
:rst:dir:`code-block`, ``pre``, ``sphinxVerbatim``
|
2024-08-19 13:43:47 -05:00
|
|
|
|
:rst:dir:`literalinclude`, ``pre``, ``sphinxVerbatim``
|
|
|
|
|
:dudir:`topic`, ``div.topic``, ``sphinxtopic``
|
|
|
|
|
contents_, ``div.contents``, ``sphinxcontents``
|
|
|
|
|
:dudir:`sidebar`, ``div.sidebar``, ``sphinxsidebar``
|
2024-07-13 11:33:22 -05:00
|
|
|
|
:dudir:`note`, ``div.note``, ``sphinxnote``
|
|
|
|
|
:dudir:`warning`, ``div.warning``, ``sphinxwarning``
|
|
|
|
|
further admonition types ``<type>``, ``div.<type>``, ``sphinx<type>``
|
|
|
|
|
:rst:dir:`seealso`, ``div.seealso``, ``sphinxseealso``
|
|
|
|
|
:rst:dir:`todo`, ``div.todo``, ``sphinxtodo``
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
Here are now these options as well as their common defaults.
|
|
|
|
|
Replace below ``<prefix>`` by the actual prefix as explained above. Don't
|
2023-03-13 04:47:01 -05:00
|
|
|
|
forget the underscore separating the prefix from the property names.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
|
|
|
|
- | ``<prefix>_border-top-width``,
|
|
|
|
|
| ``<prefix>_border-right-width``,
|
|
|
|
|
| ``<prefix>_border-bottom-width``,
|
|
|
|
|
| ``<prefix>_border-left-width``,
|
|
|
|
|
| ``<prefix>_border-width``. The latter can (currently) be only a *single*
|
|
|
|
|
dimension which then sets all four others.
|
|
|
|
|
|
2023-03-19 14:17:51 -05:00
|
|
|
|
The default is that all those dimensions are equal. They are set to:
|
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
* ``0.4pt`` for :rst:dir:`code-block`,
|
2024-08-19 13:43:47 -05:00
|
|
|
|
* ``0.5pt`` for :dudir:`topic` and contents_ directive,
|
|
|
|
|
* ``1pt`` for :dudir:`sidebar` directive,
|
2024-07-13 11:33:22 -05:00
|
|
|
|
* ``0.5pt`` for :dudir:`note` and other "light" admonitions,
|
|
|
|
|
* ``0.5pt`` for :rst:dir:`seealso` and :rst:dir:`todo` directives,
|
|
|
|
|
* ``1pt`` for :dudir:`warning` and other "strong" admonitions except
|
|
|
|
|
:dudir:`error` which uses ``1.25pt``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 7.4.0
|
|
|
|
|
Changed defaults for :dudir:`topic` and :dudir:`error`.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
Distinct from :dudir:`topic` defaults for :dudir:`sidebar`.
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
- ``<prefix>_box-decoration-break`` can be set to either ``clone`` or
|
2023-03-13 12:59:24 -05:00
|
|
|
|
``slice`` and configures the behavior at page breaks.
|
|
|
|
|
It defaults to ``slice`` for :rst:dir:`code-block` (i.e. for ``<prefix>=pre``)
|
|
|
|
|
since 6.0.0. For other directives the default is ``clone``.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
- | ``<prefix>_padding-top``,
|
|
|
|
|
| ``<prefix>_padding-right``,
|
|
|
|
|
| ``<prefix>_padding-bottom``,
|
|
|
|
|
| ``<prefix>_padding-left``,
|
|
|
|
|
| ``<prefix>_padding``. The latter can (currently) be only a *single*
|
|
|
|
|
dimension which then sets all four others.
|
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The defaults:
|
2023-03-19 14:17:51 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
* all four ``3pt`` for :rst:dir:`code-block`,
|
2024-08-19 13:43:47 -05:00
|
|
|
|
* ``6pt``, ``7pt``, ``6pt``, ``7pt`` for :dudir:`topic`,
|
|
|
|
|
* ``10pt``, ``7pt``, ``12pt``, ``7pt`` for contents_,
|
|
|
|
|
* ``6pt``, ``5.5pt``, ``6pt``, ``5.5pt`` for :dudir:`sidebar`,
|
2024-07-13 11:33:22 -05:00
|
|
|
|
* ``6pt``, ``7pt``, ``6pt``, ``7pt`` for all "light" admonitions as well
|
|
|
|
|
as the :rst:dir:`seealso` and :rst:dir:`todo` directives.
|
|
|
|
|
* ``6pt``, ``6.5pt``, ``6pt``, ``6.5pt`` for the strong admonition types
|
|
|
|
|
except :dudir:`error` which uses horizontal padding of ``6.25pt``.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
.. versionchanged:: 7.4.0
|
2023-03-19 17:54:56 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
All defaults were changed, except for :rst:dir:`code-block`. Admonitions
|
|
|
|
|
are set-up so that left (or right) padding plus left (or right)
|
|
|
|
|
border-width add up always to ``7.5pt``, so contents align well
|
|
|
|
|
vertically across admonition types on same page in PDF. This is only a
|
|
|
|
|
property of defaults, not a constraint on possible user choices.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
Separate defaults for :dudir:`topic`, contents_, and :dudir:`sidebar`.
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
- | ``<prefix>_border-top-left-radius``,
|
|
|
|
|
| ``<prefix>_border-top-right-radius``,
|
|
|
|
|
| ``<prefix>_border-bottom-right-radius``,
|
|
|
|
|
| ``<prefix>_border-bottom-left-radius``,
|
2023-03-19 17:54:56 -05:00
|
|
|
|
| ``<prefix>_border-radius``. This last key sets the first four to
|
|
|
|
|
its assigned value. Each key value can be either a single, or *two*,
|
|
|
|
|
dimensions which are then space separated.
|
2023-03-19 14:17:51 -05:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
The defaults:
|
|
|
|
|
|
|
|
|
|
* ``3pt`` for :rst:dir:`code-block` (since 6.0.0) and all corners,
|
2024-08-19 13:43:47 -05:00
|
|
|
|
* ``8pt`` for all corners of :dudir:`topic`,
|
|
|
|
|
* ``12pt`` for the bottom right corner of contents_, others use ``0pt``,
|
|
|
|
|
* ``12pt`` for the top-left and bottom-right corners for :dudir:`sidebar`,
|
|
|
|
|
``0pt`` for top-right and bottom-left.
|
2024-07-13 11:33:22 -05:00
|
|
|
|
* all radii set to ``5pt`` for :dudir:`note`, :dudir:`hint` and
|
|
|
|
|
:dudir:`tip`,
|
|
|
|
|
* ``0pt``, i.e. straight corners for all other directives.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 7.4.0
|
2024-08-19 13:43:47 -05:00
|
|
|
|
:dudir:`topic` and :dudir:`note`\ -like
|
|
|
|
|
admonitions acquire (at least one) rounded corners.
|
2023-03-19 14:17:51 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
Separate defaults for :dudir:`topic`, contents_, and :dudir:`sidebar`.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2023-03-19 14:17:51 -05:00
|
|
|
|
See a remark above about traps with spaces in LaTeX.
|
2023-03-12 12:28:54 -05:00
|
|
|
|
- ``<prefix>_box-shadow`` is special in so far as it may be:
|
2023-03-12 12:37:21 -05:00
|
|
|
|
|
|
|
|
|
* the ``none`` keyword,
|
2023-03-12 12:28:54 -05:00
|
|
|
|
* or a single dimension (giving both x-offset and y-offset),
|
|
|
|
|
* or two dimensions (separated by a space),
|
|
|
|
|
* or two dimensions followed by the keyword ``inset``.
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
The x-offset and y-offset may be negative. A negative x-offset means
|
|
|
|
|
that the shadow is on the left. The shadow extends into the page margin,
|
|
|
|
|
whether the offset is positive or negative.
|
|
|
|
|
|
|
|
|
|
The default is ``none`` *except* for the contents_ directive which uses
|
|
|
|
|
``4pt 4pt``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
No shadow per default for :dudir:`topic` and :dudir:`sidebar`.
|
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
- | ``<prefix>_border-TeXcolor``,
|
|
|
|
|
| ``<prefix>_background-TeXcolor``,
|
2023-03-19 06:15:57 -05:00
|
|
|
|
| ``<prefix>_box-shadow-TeXcolor``,
|
|
|
|
|
| ``<prefix>_TeXcolor``.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
These are colors.
|
|
|
|
|
|
2024-07-15 12:28:40 -05:00
|
|
|
|
Since 6.0.0 the border and background colors of :rst:dir:`code-block`,
|
|
|
|
|
default respectively to ``{RGB}{32,32,32}`` (i.e. ``{HTML}{202020}``), and
|
|
|
|
|
``{RGB}{242,242,242}`` (i.e. ``{gray}{0.95}`` or ``{HTML}{F2F2F2}``).
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-07-15 12:28:40 -05:00
|
|
|
|
At 7.4.0 other directives acquire non-black/white default border and
|
|
|
|
|
background colors. Here they are using ``xcolor`` hexadecimal notation
|
|
|
|
|
(which requires always 6 hexadecimal digits):
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-07-15 12:28:40 -05:00
|
|
|
|
- ``{HTML}{F7F7F7}`` serves as background color to all.
|
|
|
|
|
- ``{HTML}{86989B}`` is border color of light admonitions (inclusive of
|
2024-08-19 13:43:47 -05:00
|
|
|
|
:rst:dir:`seealso` and :rst:dir:`todo`) as well as of :dudir:`topic`,
|
|
|
|
|
contents_ and :dudir:`sidebar` directives.
|
|
|
|
|
- ``{HTML}{940000}`` is border color of :dudir:`warning`-type admonitions,
|
2024-07-15 12:28:40 -05:00
|
|
|
|
except :dudir:`error` which uses ``{HTML}{B40000}``.
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
The only directives displaying a shadow per default are contents_ and
|
|
|
|
|
:dudir:`sidebar`. The shadow-color for the former is ``{HTML}{6C6C6C}``
|
|
|
|
|
and for the latter ``{HTML}{9EACAF}``.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
The ``<prefix>_TeXcolor`` stands for the CSS property "color", i.e. it
|
|
|
|
|
influences the text color of the contents. As for the three other options,
|
|
|
|
|
the naming ``TeXcolor`` is to stress that the input syntax is the TeX one
|
2023-03-19 17:54:56 -05:00
|
|
|
|
for colors not an HTML/CSS one. If package ``xcolor`` is available in the
|
2023-03-20 04:33:54 -05:00
|
|
|
|
LaTeX installation, one can use directly named colors as key values.
|
|
|
|
|
Consider passing options such as ``dvipsnames``, ``svgnames`` or ``x11names``
|
|
|
|
|
to ``xcolor`` via ``'passoptionstopackages'`` key of :confval:`latex_elements`.
|
2023-03-19 17:54:56 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
If ``<prefix>_TeXcolor`` is set, a :code-tex:`\\color` command is inserted at
|
2023-03-19 06:15:57 -05:00
|
|
|
|
start of the directive contents; for admonitions, this happens after the
|
|
|
|
|
heading which reproduces the admonition type.
|
|
|
|
|
|
|
|
|
|
- ``<prefix>_TeXextras``: if set, its value must be some LaTeX command or
|
2024-08-23 11:04:38 -05:00
|
|
|
|
commands, for example :code-tex:`\\itshape`. These commands will be
|
|
|
|
|
inserted at the start of the contents; for admonitions, this happens after
|
|
|
|
|
the heading which reproduces the admonition type.
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
The next keys, for admonitions, :dudir:`topic`, contents_, and
|
|
|
|
|
:dudir:`sidebar`, were all three added at 7.4.0 (and 8.1.0 for the latter three).
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
- ``div.<type>_title-background-TeXcolor``: the background color for the title.
|
|
|
|
|
|
|
|
|
|
.. important::
|
|
|
|
|
|
|
|
|
|
The colored title-row is produced as a result of the Sphinx default
|
2024-08-23 11:04:38 -05:00
|
|
|
|
definitions for the various :code-tex:`\\sphinxstyle<type>title`
|
|
|
|
|
commands, which employ the :code-tex:`\\sphinxdotitlerow` LaTeX command.
|
|
|
|
|
See :ref:`latex-macros`.
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
- ``div.<type>_title-foreground-TeXcolor``: the color to be used for the icon
|
|
|
|
|
(it applies only to the icon, not to the title of the admonition).
|
|
|
|
|
|
|
|
|
|
- ``div.<type>_title-icon``: the LaTeX code responsible for producing the
|
|
|
|
|
icon. For example, the default for :dudir:`note` is
|
|
|
|
|
``div.note_title-icon=\faIcon{info-circle}``. This uses a command from the
|
|
|
|
|
LaTeX ``fontawesome5`` package, which is loaded automatically if available.
|
|
|
|
|
|
|
|
|
|
If neither ``fontawesome5`` nor fall-back ``fontawesome`` (for which the
|
2024-08-23 11:04:38 -05:00
|
|
|
|
associated command is :code-tex:`\\faicon`, not :code-tex:`\\faIcon`) are
|
|
|
|
|
found, or if the ``iconpackage`` key of :ref:`'sphinxsetup'
|
|
|
|
|
<latexsphinxsetup>` is set to load some other user-chosen package, or no
|
|
|
|
|
package at all, all the ``title-icons`` default to empty LaTeX code. It is
|
|
|
|
|
up to user to employ this interface to inject the icon (or anything else)
|
|
|
|
|
into the PDF output.
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
2023-03-12 05:28:36 -05:00
|
|
|
|
.. note::
|
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
- All directives support ``box-decoration-break`` to be set to ``slice``.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 6.2.0
|
|
|
|
|
|
|
|
|
|
Formerly, only :rst:dir:`code-block` did. The default remains
|
|
|
|
|
``clone`` for all other directives, but this will probably change at
|
|
|
|
|
7.0.0.
|
|
|
|
|
|
2023-03-19 17:54:56 -05:00
|
|
|
|
- The corners of rounded boxes may be elliptical.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 6.2.0
|
|
|
|
|
|
|
|
|
|
Formerly, only circular rounded corners were supported and a rounded
|
|
|
|
|
corner forced the whole frame to use the same constant width from
|
|
|
|
|
``<prefix>_border-width``.
|
2023-03-15 10:48:24 -05:00
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
- Inset shadows are incompatible with rounded corners. In case
|
2023-03-15 10:48:24 -05:00
|
|
|
|
both are specified the inset shadow will simply be ignored.
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2023-03-15 10:48:24 -05:00
|
|
|
|
.. versionchanged:: 6.2.0
|
2023-03-12 12:28:54 -05:00
|
|
|
|
|
2023-03-15 10:48:24 -05:00
|
|
|
|
Formerly it was to the contrary the rounded corners which were ignored
|
|
|
|
|
in case an inset shadow was specified.
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
- ``<prefix>_TeXcolor`` and ``<prefix>_TeXextras`` are new with 6.2.0.
|
|
|
|
|
|
|
|
|
|
Usefulness is doubtful in the case of :rst:dir:`code-block`:
|
|
|
|
|
|
|
|
|
|
- ``pre_TeXcolor`` will influence only the few non-Pygments highlighted
|
|
|
|
|
tokens; it does color the line numbers, but if one wants to color
|
|
|
|
|
*only* them one has to go through the ``fancyvrb`` interface.
|
|
|
|
|
|
2024-08-25 10:07:49 -05:00
|
|
|
|
- ``pre_TeXextras=\footnotesize`` (as an example) is equivalent to setting
|
|
|
|
|
:ref:`fvset` key value to :code-tex:`r'\\fvset{fontsize=\\footnotesize}'`.
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
|
|
|
|
Consider these options experimental and that some implementation details
|
|
|
|
|
may change. For example if the ``pre_TeXextras`` LaTeX commands were put
|
2024-08-25 10:07:49 -05:00
|
|
|
|
by Sphinx in another location it could override the :ref:`fvset` effect,
|
2023-03-19 06:15:57 -05:00
|
|
|
|
perhaps this is what will be done in a future release.
|
|
|
|
|
|
2023-03-12 12:28:54 -05:00
|
|
|
|
- Rounded boxes are done using the pict2e_ interface to some basic PDF
|
|
|
|
|
graphics operations. If this LaTeX package can not be found the build
|
|
|
|
|
will proceed and render all boxes with straight corners.
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2023-03-19 17:54:56 -05:00
|
|
|
|
- Elliptic corners use the ellipse_ LaTeX package which extends pict2e_.
|
|
|
|
|
If this LaTeX package can not be found rounded corners will be circular
|
|
|
|
|
arcs (or straight if pict2e_ is not available).
|
|
|
|
|
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
.. _pict2e: https://ctan.org/pkg/pict2e
|
2023-03-19 17:54:56 -05:00
|
|
|
|
.. _ellipse: https://ctan.org/pkg/ellipse
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
The following legacy behavior applies:
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
- For :rst:dir:`code-block` or :rst:dir:`literalinclude`, padding and
|
|
|
|
|
border-width and shadow (if any) will go into the margin; the code
|
|
|
|
|
lines remain at the same place independently of the values of the padding
|
|
|
|
|
and border-width, except for being shifted vertically of course to not
|
|
|
|
|
overwrite other text due to the width of the border or external shadow.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
- For the other directives, shadows extend horizontally into the page margins,
|
|
|
|
|
but the border and the extra padding are kept within the text area.
|
2023-03-12 05:28:36 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
- :rst:dir:`code-block` and :rst:dir:`literalinclude` use the same LaTeX
|
|
|
|
|
environment and commands and are not separately customizable.
|
LaTeX: enhanced boxes with padding, borders, shadows, rounded corners
- LaTeX: box padding (t,r,b,l), borders (t,r,b,l), shadows (x,y) or radii
- LaTeX: fix #10650 via usage of our own sophisticated \fcolorbox
- LaTeX: user interface via 'sphinxsetup' to enhanced code-blocks frames
- LaTeX: user interface via 'sphinxsetup' to enhanced topic boxes
- LaTeX: CSS-named-alikes 'sphinxsetup' options for code-blocks and
topics
- LaTeX: CSS-named-alikes 'sphinxsetup' keys for warning type notices
(fix #10651)
- LaTeX: documentation of the new CSS-like options
- LaTeX: remove #10619 documentation, as the #10619 added
shadowBorderColor and shadowShadowColor now named respectively:
aside.topic_border-TeXcolor and aside.topic_box-shadow-TeXcolor
- LaTeX: use div.topic option prefix and not aside.topic for CSS-like
options
- LaTeX: keep the implicit legacy padding of warning type boxes as
default behaviour
2022-07-07 11:04:21 -05:00
|
|
|
|
|
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
LaTeX macros and environments
|
|
|
|
|
-----------------------------
|
2016-10-27 13:24:33 -05:00
|
|
|
|
|
2021-01-27 07:08:28 -06:00
|
|
|
|
The "LaTeX package" file :file:`sphinx.sty` loads various components
|
|
|
|
|
providing support macros (aka commands), and environments, which are used in
|
|
|
|
|
the mark-up produced on output from the ``latex`` builder, before conversion
|
|
|
|
|
to ``pdf`` via the LaTeX toolchain. Also the "LaTeX class" files
|
|
|
|
|
:file:`sphinxhowto.cls` and :file:`sphinxmanual.cls` define or customize some
|
|
|
|
|
environments. All of these files can be found in the latex build repertory.
|
|
|
|
|
|
|
|
|
|
Some of these provide facilities not available from pre-existing LaTeX
|
|
|
|
|
packages and work around LaTeX limitations with lists, table cells, verbatim
|
|
|
|
|
rendering, footnotes, etc...
|
|
|
|
|
|
|
|
|
|
Others simply define macros with public names to make overwriting their
|
|
|
|
|
defaults easy via user-added contents to the preamble. We will survey most of
|
|
|
|
|
those public names here, but defaults have to be looked at in their respective
|
|
|
|
|
definition files.
|
|
|
|
|
|
|
|
|
|
.. hint::
|
|
|
|
|
|
|
|
|
|
Sphinx LaTeX support code is split across multiple smaller-sized files.
|
|
|
|
|
Rather than adding code to the preamble via
|
|
|
|
|
`latex_elements <latex_elements_confval_>`_\ [``'preamble'``] it is
|
|
|
|
|
also possible to replace entirely one of the component files of Sphinx
|
|
|
|
|
LaTeX code with a custom version, simply by including a modified copy in
|
|
|
|
|
the project source and adding the filename to the
|
|
|
|
|
:confval:`latex_additional_files` list. Check the LaTeX build repertory
|
|
|
|
|
for the filenames and contents.
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 4.0.0
|
|
|
|
|
split of :file:`sphinx.sty` into multiple smaller units, to facilitate
|
|
|
|
|
customization of many aspects simultaneously.
|
2016-10-28 14:45:44 -05:00
|
|
|
|
|
2018-12-22 10:33:03 -06:00
|
|
|
|
.. _latex-macros:
|
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
Macros
|
|
|
|
|
~~~~~~
|
2016-10-11 11:16:47 -05:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
- Text styling commands:
|
2019-04-12 12:21:34 -05:00
|
|
|
|
|
2023-01-24 07:39:18 -06:00
|
|
|
|
.. csv-table::
|
|
|
|
|
:header: Name, ``maps argument #1 to:``
|
|
|
|
|
:align: left
|
2023-04-11 15:51:40 -05:00
|
|
|
|
:class: longtable
|
2023-01-24 07:39:18 -06:00
|
|
|
|
:delim: ;
|
|
|
|
|
|
|
|
|
|
``\sphinxstrong``; ``\textbf{#1}``
|
|
|
|
|
``\sphinxcode``; ``\texttt{#1}``
|
|
|
|
|
``\sphinxbfcode``; ``\textbf{\sphinxcode{#1}}``
|
|
|
|
|
``\sphinxemail``; ``\textsf{#1}``
|
|
|
|
|
``\sphinxtablecontinued``; ``\textsf{#1}``
|
|
|
|
|
``\sphinxtitleref``; ``\emph{#1}``
|
|
|
|
|
``\sphinxmenuselection``; ``\emph{#1}``
|
|
|
|
|
``\sphinxguilabel``; ``\emph{#1}``
|
|
|
|
|
``\sphinxkeyboard``; ``\sphinxcode{#1}``
|
|
|
|
|
``\sphinxaccelerator``; ``\underline{#1}``
|
|
|
|
|
``\sphinxcrossref``; ``\emph{#1}``
|
|
|
|
|
``\sphinxtermref``; ``\emph{#1}``
|
|
|
|
|
``\sphinxsamedocref``; ``\emph{#1}``
|
|
|
|
|
``\sphinxparam``; ``\emph{#1}``
|
2023-07-23 17:22:40 -05:00
|
|
|
|
``\sphinxtypeparam``; ``\emph{#1}``
|
2023-01-24 07:39:18 -06:00
|
|
|
|
``\sphinxoptional``; ``[#1]`` with larger brackets, see source
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2017-03-01 15:26:49 -06:00
|
|
|
|
.. versionadded:: 1.4.5
|
|
|
|
|
Use of ``\sphinx`` prefixed macro names to limit possibilities of conflict
|
|
|
|
|
with LaTeX packages.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2023-01-24 07:39:18 -06:00
|
|
|
|
.. versionadded:: 1.8
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxguilabel`
|
2023-01-24 07:39:18 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxkeyboard`
|
2023-01-24 07:39:18 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.2.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxparam`, :code-tex:`\\sphinxsamedocref`
|
2023-01-24 07:39:18 -06:00
|
|
|
|
|
2023-05-11 08:28:57 -05:00
|
|
|
|
.. versionadded:: 7.1.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxparamcomma` which defaults to a comma followed by a
|
|
|
|
|
space and :code-tex:`\\sphinxparamcommaoneperline`. It is sed for
|
|
|
|
|
one-parameter-per-line signatures (see
|
|
|
|
|
:confval:`maximum_signature_line_length`) and defaults to
|
|
|
|
|
:code-tex:`\\texttt{,}`.
|
|
|
|
|
|
|
|
|
|
Signatures of Python functions are rendered as
|
|
|
|
|
``name<space>(parameters)`` or ``name<space>[type
|
|
|
|
|
parameters]<space>(parameters)`` (see :pep:`695`) where the length of
|
|
|
|
|
``<space>`` is set to ``0pt`` by default. This can be changed via
|
|
|
|
|
:code-tex:`\\setlength{\\sphinxsignaturelistskip}{1ex}` for instance.
|
2023-07-23 17:22:40 -05:00
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
- More text styling:
|
2019-04-12 12:21:34 -05:00
|
|
|
|
|
2023-01-24 07:39:18 -06:00
|
|
|
|
.. csv-table::
|
|
|
|
|
:header: Name, ``maps argument #1 to:``
|
|
|
|
|
:align: left
|
2023-04-11 13:48:24 -05:00
|
|
|
|
:class: longtable
|
2023-01-24 07:39:18 -06:00
|
|
|
|
:delim: ;
|
|
|
|
|
|
2023-03-27 07:54:41 -05:00
|
|
|
|
``\sphinxstyleindexentry``; ``\texttt{#1}``
|
|
|
|
|
``\sphinxstyleindexextra``; ``(\emph{#1})`` (with a space upfront)
|
|
|
|
|
``\sphinxstyleindexpageref``; ``, \pageref{#1}``
|
|
|
|
|
``\sphinxstyleindexpagemain``; ``\textbf{#1}``
|
|
|
|
|
``\sphinxstyleindexlettergroup``; ``{\Large\sffamily#1}\nopagebreak\vspace{1mm}``
|
2023-01-24 07:39:18 -06:00
|
|
|
|
``\sphinxstyleindexlettergroupDefault``; check source, too long for here
|
2023-03-27 07:54:41 -05:00
|
|
|
|
``\sphinxstyletopictitle``; ``\textbf{#1}\par\medskip``
|
|
|
|
|
``\sphinxstylesidebartitle``; ``\textbf{#1}\par\medskip``
|
|
|
|
|
``\sphinxstyleothertitle``; ``\textbf{#1}``
|
|
|
|
|
``\sphinxstylesidebarsubtitle``; ``~\\\textbf{#1} \smallskip``
|
|
|
|
|
``\sphinxstyletheadfamily``; ``\sffamily`` (*this one has no argument*)
|
|
|
|
|
``\sphinxstyleemphasis``; ``\emph{#1}``
|
|
|
|
|
``\sphinxstyleliteralemphasis``; ``\emph{\sphinxcode{#1}}``
|
|
|
|
|
``\sphinxstylestrong``; ``\textbf{#1}``
|
|
|
|
|
``\sphinxstyleliteralstrong``; ``\sphinxbfcode{#1}``
|
|
|
|
|
``\sphinxstyleabbreviation``; ``\textsc{#1}``
|
|
|
|
|
``\sphinxstyleliteralintitle``; ``\sphinxcode{#1}``
|
|
|
|
|
``\sphinxstylecodecontinued``; ``{\footnotesize(#1)}}``
|
|
|
|
|
``\sphinxstylecodecontinues``; ``{\footnotesize(#1)}}``
|
2024-08-19 13:43:47 -05:00
|
|
|
|
``\sphinxstylenotetitle``; ``\sphinxdotitlerow{note}{#1}``
|
|
|
|
|
``\sphinxstylehinttitle``; ``\sphinxdotitlerow{hint}{#1}``
|
|
|
|
|
``\sphinxstyleimportanttitle``; ``\sphinxdotitlerow{important}{#1}``
|
|
|
|
|
``\sphinxstyletiptitle``; ``\sphinxdotitlerow{tip}{#1}``
|
|
|
|
|
``\sphinxstylewarningtitle``; ``\sphinxdotitlerow{warning}{#1}``
|
|
|
|
|
``\sphinxstylecautiontitle``; ``\sphinxdotitlerow{caution}{#1}``
|
|
|
|
|
``\sphinxstyleattentiontitle``; ``\sphinxdotitlerow{attention}{#1}``
|
|
|
|
|
``\sphinxstyledangertitle``; ``\sphinxdotitlerow{danger}{#1}``
|
|
|
|
|
``\sphinxstyleerrortitle``; ``\sphinxdotitlerow{error}{#1}``
|
|
|
|
|
``\sphinxstyleseealsotitle``; ``\sphinxdotitlerow{seealso}{#1}``
|
|
|
|
|
``\sphinxstyletodotitle``; ``\sphinxdotitlerow{todo}{#1}``
|
|
|
|
|
``\sphinxstyletopictitle``; ``\sphinxdotitlerow{topic}{#1}``
|
|
|
|
|
``\sphinxstylecontentstitle``; ``\sphinxdotitlerow{contents}{#1}``
|
|
|
|
|
``\sphinxstylesidebartitle``; ``\sphinxdotitlerow{sidebar}{#1}``
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
To let this table fit on the page width in PDF output we have lied a bit.
|
2024-08-23 11:04:38 -05:00
|
|
|
|
For instance, the actual definition of :code-tex:`\\sphinxstylenotetitle` is:
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
.. code-block:: latex
|
|
|
|
|
|
|
|
|
|
\newcommand\sphinxstylenotetitle[1]%
|
2024-08-19 13:43:47 -05:00
|
|
|
|
{\sphinxdotitlerow{note}{\sphinxremovefinalcolon{#1}}}
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
The same remark applies to all other similar commands associated with
|
2024-08-19 13:43:47 -05:00
|
|
|
|
admonitions. The :dudir:`topic`, contents_, and :dudir:`sidebar` do not
|
2024-08-23 11:04:38 -05:00
|
|
|
|
use :code-tex:`\\sphinxremovefinalcolon` as they don't need it.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2016-06-18 13:25:48 -05:00
|
|
|
|
.. versionadded:: 1.5
|
2024-08-23 11:04:38 -05:00
|
|
|
|
These macros were formerly hard-coded as non customizable :code-tex:`\\texttt`,
|
|
|
|
|
:code-tex:`\\emph`, etc...
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2017-05-07 04:10:41 -05:00
|
|
|
|
.. versionadded:: 1.6
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxstyletheadfamily` which defaults to
|
|
|
|
|
:code-tex:`\\sffamily` and allows
|
2017-05-07 04:10:41 -05:00
|
|
|
|
multiple paragraphs in header cells of tables.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2017-05-23 08:58:03 -05:00
|
|
|
|
.. versionadded:: 1.6.3
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxstylecodecontinued` and
|
|
|
|
|
:code-tex:`\\sphinxstylecodecontinues`.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2023-01-24 07:39:18 -06:00
|
|
|
|
.. versionadded:: 1.8
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxstyleindexlettergroup`,
|
|
|
|
|
:code-tex:`\\sphinxstyleindexlettergroupDefault`.
|
2023-01-24 07:39:18 -06:00
|
|
|
|
|
2023-03-27 07:54:41 -05:00
|
|
|
|
.. versionadded:: 6.2.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxstylenotetitle` et al. The ``#1`` is the localized
|
|
|
|
|
name of the directive, with a final colon. Wrap it as
|
|
|
|
|
:code-tex:`\\sphinxremovefinalcolon{#1}` if this final colon is to be
|
|
|
|
|
removed.
|
2023-03-27 07:54:41 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionadded:: 7.4.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Added the :code-tex:`\\sphinxdotitlerowwithicon` LaTeX command.
|
2023-03-27 07:54:41 -05:00
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionchanged:: 8.1.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\sphinxdotitlerowwithicon` now detects automatically if an icon is
|
2024-08-19 13:43:47 -05:00
|
|
|
|
associated or not with the rendered element used as first argument.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
.. versionadded:: 8.1.0 Make :code-tex:`\\sphinxdotitlerow` an alias to
|
|
|
|
|
:code-tex:`\\sphinxdotitlerowwithicon`.
|
2024-08-19 13:43:47 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 8.1.0
|
|
|
|
|
Titles of :dudir:`topic`, contents_, and :dudir:`sidebar` directives are
|
2024-08-23 11:04:38 -05:00
|
|
|
|
also styled using :code-tex:`\\sphinxdotitlerow` (they have no default icons
|
2024-08-19 13:43:47 -05:00
|
|
|
|
associated with them).
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`\\sphinxtableofcontents`: A wrapper (defined differently in
|
2018-10-05 04:26:22 -05:00
|
|
|
|
:file:`sphinxhowto.cls` and in :file:`sphinxmanual.cls`) of standard
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\tableofcontents`. The macro
|
|
|
|
|
:code-tex:`\\sphinxtableofcontentshook` is executed during its expansion right
|
|
|
|
|
before :code-tex:`\\tableofcontents` itself.
|
2017-06-05 05:11:41 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Formerly, the meaning of :code-tex:`\\tableofcontents` was modified by Sphinx.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2018-12-22 10:33:03 -06:00
|
|
|
|
.. versionchanged:: 2.0
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Hard-coded redefinitions of :code-tex:`\\l@section` and
|
|
|
|
|
:code-tex:`\\l@subsection` formerly done during loading of ``'manual'``
|
|
|
|
|
docclass are now executed later via
|
|
|
|
|
:code-tex:`\\sphinxtableofcontentshook`. This macro is also executed by
|
|
|
|
|
the ``'howto'`` docclass, but defaults to empty with it.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2022-09-24 15:32:07 -05:00
|
|
|
|
.. hint::
|
|
|
|
|
|
|
|
|
|
If adding to preamble the loading of ``tocloft`` package, also add to
|
2024-08-23 11:04:38 -05:00
|
|
|
|
preamble :code-tex:`\\renewcommand\sphinxtableofcontentshook{}` else it
|
|
|
|
|
will reset :code-tex:`\\l@section` and :code-tex:`\\l@subsection`
|
|
|
|
|
cancelling ``tocloft`` customization.
|
2022-09-24 15:32:07 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`\\sphinxmaketitle`: Used as the default setting of the ``'maketitle'``
|
2018-10-05 04:26:22 -05:00
|
|
|
|
:confval:`latex_elements` key.
|
|
|
|
|
Defined in the class files :file:`sphinxmanual.cls` and
|
|
|
|
|
:file:`sphinxhowto.cls`.
|
2018-12-21 14:38:27 -06:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.8.3
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Formerly, :code-tex:`\\maketitle` from LaTeX document class was modified by
|
2018-12-21 14:38:27 -06:00
|
|
|
|
Sphinx.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`\\sphinxbackoftitlepage`: For ``'manual'`` docclass, and if it is
|
|
|
|
|
defined, it gets executed at end of :code-tex:`\\sphinxmaketitle`, before
|
|
|
|
|
the final :code-tex:`\\clearpage`. Use either the ``'maketitle'`` key or
|
|
|
|
|
the ``'preamble'`` key of :confval:`latex_elements` to add a custom
|
|
|
|
|
definition of :code-tex:`\\sphinxbackoftitlepage`.
|
2018-12-21 14:38:27 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8.3
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- :code-tex:`\\sphinxcite`: A wrapper of standard :code-tex:`\\cite` for
|
|
|
|
|
citation references.
|
2017-06-05 05:11:41 -05:00
|
|
|
|
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
|
|
|
|
.. _sphinxbox:
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
The :code-tex:`\\sphinxbox` command
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.2.0
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
The :code-tex:`\\sphinxbox[key=value,...]{inline text}` command can be used to "box"
|
2023-03-07 12:10:43 -06:00
|
|
|
|
inline text elements with all the customizability which has been described in
|
|
|
|
|
:ref:`additionalcss`. It is a LaTeX command with one optional argument, which
|
|
|
|
|
is a comma-separated list of key=value pairs, as for :ref:`latexsphinxsetup`.
|
2023-03-20 04:33:54 -05:00
|
|
|
|
Here is the complete list of keys. They don't use any prefix.
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
|
|
|
|
- ``border-width``,
|
|
|
|
|
- ``border-top-width``, ``border-right-width``, ``border-bottom-width``,
|
|
|
|
|
``border-left-width``,
|
|
|
|
|
- ``padding``,
|
|
|
|
|
- ``padding-top``, ``padding-right``, ``padding-bottom``, ``padding-left``,
|
|
|
|
|
- ``border-radius``,
|
|
|
|
|
- ``border-top-left-radius``, ``border-top-right-radius``,
|
|
|
|
|
``border-bottom-right-radius``, ``border-bottom-left-radius``,
|
|
|
|
|
- ``box-shadow``,
|
2023-03-14 17:42:38 -05:00
|
|
|
|
- ``border-TeXcolor``, ``background-TeXcolor``, ``box-shadow-TeXcolor``,
|
2023-03-19 06:15:57 -05:00
|
|
|
|
``TeXcolor``,
|
|
|
|
|
- ``TeXextras``,
|
2023-03-14 17:42:38 -05:00
|
|
|
|
- and ``addstrut`` which is a boolean key, i.e. to be used as ``addstrut=true``,
|
|
|
|
|
or ``addstrut`` alone where ``=true`` is omitted, or ``addstrut=false``.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
This last key is specific to :code-tex:`\\sphinxbox` and it means to add a
|
|
|
|
|
:code-tex:`\\strut` so that heights and depths are equalized across various
|
|
|
|
|
instances on the same line with varying contents. The default is
|
|
|
|
|
``addstrut=false``. The combination ``addstrut, padding-bottom=0pt,
|
|
|
|
|
padding-top=1pt`` is often satisfactory.
|
2023-03-14 17:42:38 -05:00
|
|
|
|
|
|
|
|
|
Refer to :ref:`additionalcss` for important syntax information regarding the
|
2024-08-23 11:04:38 -05:00
|
|
|
|
other keys. The default configuration uses no shadow, a border-width of
|
|
|
|
|
:code-tex:`\\fboxrule`, a padding of :code-tex:`\\fboxsep`, circular corners
|
|
|
|
|
with radii :code-tex:`\\fboxsep` and background and border colors as for the
|
|
|
|
|
default rendering of code-blocks.
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
When a :code-tex:`\\sphinxbox` usage is nested within another one, it will ignore the
|
2023-03-19 04:43:11 -05:00
|
|
|
|
options of the outer one: it first resets all options to their default state
|
|
|
|
|
as they were prior to applying the outer box options, then it applies its own
|
|
|
|
|
specific ones.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
One can modify these defaults via the command
|
|
|
|
|
:code-tex:`\\sphinxboxsetup{key=value,...}`. The effect is cumulative, if one
|
|
|
|
|
uses this command multiple times. Here the options are a mandatory argument
|
|
|
|
|
so are within curly braces, not square brackets.
|
2023-03-07 12:10:43 -06:00
|
|
|
|
|
2023-03-19 06:15:57 -05:00
|
|
|
|
Here is some example of use:
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
|
|
|
|
.. code-block:: latex
|
|
|
|
|
|
|
|
|
|
latex_elements = {
|
|
|
|
|
'preamble': r'''
|
2023-03-19 06:15:57 -05:00
|
|
|
|
% modify globally the defaults
|
|
|
|
|
\sphinxboxsetup{border-width=2pt,%
|
|
|
|
|
border-radius=4pt,%
|
|
|
|
|
background-TeXcolor=yellow!20}
|
|
|
|
|
% configure some styling element with some extra specific options:
|
|
|
|
|
\protected\def\sphinxkeyboard#1{\sphinxbox[border-TeXcolor=green]{\sphinxcode{#1}}}
|
2023-03-06 05:31:14 -06:00
|
|
|
|
''',
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
A utility :code-tex:`\\newsphinxbox` is provided to create a new boxing macro,
|
|
|
|
|
say :code-tex:`\\foo` which will act exactly like :code-tex:`\\sphinxbox` but
|
|
|
|
|
with a given extra configuration:
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
|
|
|
|
.. code-block:: latex
|
|
|
|
|
|
|
|
|
|
% the specific options to \foo are within brackets
|
|
|
|
|
\newsphinxbox[border-radius=0pt, box-shadow=2pt 2pt]{\foo}
|
|
|
|
|
% then use this \foo, possibly with some extra options still:
|
|
|
|
|
\protected\def\sphinxguilabel#1{\foo{#1}}
|
|
|
|
|
\protected\def\sphinxmenuselection#1{\foo[box-shadow-TeXcolor=gray]{#1}}
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Boxes rendered with :code-tex:`\\foo` obey as the ones using directly
|
|
|
|
|
:code-tex:`\\sphinxbox` the current configuration as set possibly mid-way in
|
|
|
|
|
document via :code-tex:`\\sphinxboxsetup` (from a :dudir:`raw` LaTeX mark-up),
|
|
|
|
|
the only difference is that they have an initial additional set of default
|
|
|
|
|
extras.
|
2023-03-19 06:15:57 -05:00
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
In the above examples, you can probably use :code-tex:`\\renewcommand` syntax
|
|
|
|
|
if you prefer it to :code-tex:`\\protected\\def` (with ``[1]`` in place of
|
|
|
|
|
``#1`` then).
|
2023-03-07 12:10:43 -06:00
|
|
|
|
|
2023-03-06 05:31:14 -06:00
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
Environments
|
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
- A :dudir:`figure` may have an optional legend with arbitrary body
|
2017-05-04 02:36:04 -05:00
|
|
|
|
elements: they are rendered in a ``sphinxlegend`` environment. The default
|
2024-08-23 11:04:38 -05:00
|
|
|
|
definition issues :code-tex:`\\small`, and ends with :code-tex:`\\par`.
|
2017-05-04 02:36:04 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.5.6
|
2024-08-23 11:04:38 -05:00
|
|
|
|
Formerly, the :code-tex:`\\small` was hardcoded in LaTeX writer and the ending
|
|
|
|
|
:code-tex:`\\par` was lacking.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
- Environments associated with admonitions:
|
2019-04-12 12:30:31 -05:00
|
|
|
|
|
|
|
|
|
- ``sphinxnote``,
|
|
|
|
|
- ``sphinxhint``,
|
|
|
|
|
- ``sphinximportant``,
|
|
|
|
|
- ``sphinxtip``,
|
|
|
|
|
- ``sphinxwarning``,
|
|
|
|
|
- ``sphinxcaution``,
|
|
|
|
|
- ``sphinxattention``,
|
|
|
|
|
- ``sphinxdanger``,
|
|
|
|
|
- ``sphinxerror``.
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
They may be :code-tex:`\\renewenvironment`
|
2016-06-18 13:25:48 -05:00
|
|
|
|
'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
|
|
|
|
|
English is the document language). Their default definitions use either the
|
2019-04-12 12:30:31 -05:00
|
|
|
|
*sphinxheavybox* (for the last 5 ones) or the *sphinxlightbox*
|
2023-03-12 05:28:36 -05:00
|
|
|
|
environments, configured to use the parameters (colors, border thickness)
|
2016-11-05 10:58:01 -05:00
|
|
|
|
specific to each type, which can be set via ``'sphinxsetup'`` string.
|
2016-06-18 13:25:48 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Use of public environment names, separate customizability of the
|
2017-06-05 05:11:41 -05:00
|
|
|
|
parameters, such as ``noteBorderColor``, ``noteborder``,
|
|
|
|
|
``warningBgColor``, ``warningBorderColor``, ``warningborder``, ...
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2023-01-03 10:11:58 -06:00
|
|
|
|
- Environment for the :rst:dir:`seealso` directive: ``sphinxseealso``.
|
2023-03-26 11:52:06 -05:00
|
|
|
|
It takes one argument which will be the localized string ``See also``
|
|
|
|
|
followed with a colon.
|
2023-01-03 10:11:58 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 6.1.0
|
2023-03-26 11:52:06 -05:00
|
|
|
|
.. versionchanged:: 6.2.0
|
|
|
|
|
Colon made part of the mark-up rather than being inserted by the
|
|
|
|
|
environment for coherence with how admonitions are handled generally.
|
2023-01-03 10:11:58 -06:00
|
|
|
|
|
2024-07-13 11:33:22 -05:00
|
|
|
|
- Environment for the :rst:dir:`todo` directive: ``sphinxtodo``.
|
2024-08-19 13:43:47 -05:00
|
|
|
|
It takes one argument, namely the localization of ``Todo``
|
|
|
|
|
(with a colon at the end; the default rendering will remove that
|
|
|
|
|
colon and put the localized string in its own colored title-row).
|
2024-07-13 11:33:22 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 7.4.0
|
2024-08-19 13:43:47 -05:00
|
|
|
|
|
|
|
|
|
- The :dudir:`topic`, contents_ and :dudir:`sidebar` directives
|
|
|
|
|
are associated with respectively ``sphinxtopic``, ``sphinxcontents``,
|
|
|
|
|
and ``sphinxsidebar`` environments.
|
2016-06-18 13:25:48 -05:00
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
.. versionadded:: 1.4.2
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Former code refactored into an environment allowing page breaks.
|
|
|
|
|
|
2016-06-18 13:25:48 -05:00
|
|
|
|
.. versionchanged:: 1.5
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Options ``shadowsep``, ``shadowsize``, ``shadowrule``.
|
|
|
|
|
|
2024-08-19 13:43:47 -05:00
|
|
|
|
.. versionadded:: 8.1.0
|
|
|
|
|
Separate environments (all three wrappers around ``sphinxShadowBox``)
|
|
|
|
|
and separate customizability.
|
|
|
|
|
|
|
|
|
|
- The literal blocks (via ``::`` or :rst:dir:`code-block`), and literal
|
|
|
|
|
includes (:rst:dir:`literalinclude`) are
|
2016-06-22 15:30:58 -05:00
|
|
|
|
implemented using ``sphinxVerbatim`` environment which is a wrapper of
|
|
|
|
|
``Verbatim`` environment from package ``fancyvrb.sty``. It adds the handling
|
|
|
|
|
of the top caption and the wrapping of long lines, and a frame which allows
|
2023-03-12 12:28:54 -05:00
|
|
|
|
page breaks. Inside tables the used
|
2016-06-22 15:30:58 -05:00
|
|
|
|
environment is ``sphinxVerbatimintable`` (it does not draw a frame, but
|
|
|
|
|
allows a caption).
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2017-06-05 05:11:41 -05:00
|
|
|
|
``Verbatim`` keeps exact same meaning as in ``fancyvrb.sty`` (also
|
|
|
|
|
under the name ``OriginalVerbatim``); ``sphinxVerbatimintable`` is used
|
|
|
|
|
inside tables.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2016-06-22 15:30:58 -05:00
|
|
|
|
.. versionadded:: 1.5
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Options ``verbatimwithframe``, ``verbatimwrapslines``,
|
2017-06-05 05:11:41 -05:00
|
|
|
|
``verbatimsep``, ``verbatimborder``.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
2017-12-12 03:56:54 -06:00
|
|
|
|
.. versionadded:: 1.6.6
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Support for ``:emphasize-lines:`` option
|
|
|
|
|
|
2017-12-12 03:56:54 -06:00
|
|
|
|
.. versionadded:: 1.6.6
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Easier customizability of the formatting via exposed to user LaTeX macros
|
2024-08-23 11:04:38 -05:00
|
|
|
|
such as :code-tex:`\\sphinxVerbatimHighlightLine`.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
- The bibliography uses ``sphinxthebibliography`` and the Python Module index
|
2017-06-05 12:42:47 -05:00
|
|
|
|
as well as the general index both use ``sphinxtheindex``; these environments
|
|
|
|
|
are wrappers of the ``thebibliography`` and respectively ``theindex``
|
|
|
|
|
environments as provided by the document class (or packages).
|
2016-10-13 07:09:43 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Formerly, the original environments were modified by Sphinx.
|
2016-06-18 13:25:48 -05:00
|
|
|
|
|
2017-06-05 05:11:41 -05:00
|
|
|
|
Miscellany
|
|
|
|
|
~~~~~~~~~~
|
|
|
|
|
|
2024-08-23 11:04:38 -05:00
|
|
|
|
- Every text paragraph in document body starts with :code-tex:`\\sphinxAtStartPar`.
|
2021-01-29 03:09:36 -06:00
|
|
|
|
Currently, this is used to insert a zero width horizontal skip which
|
|
|
|
|
is a trick to allow TeX hyphenation of the first word of a paragraph
|
|
|
|
|
in a narrow context (like a table cell). For ``'lualatex'`` which
|
2024-08-23 11:04:38 -05:00
|
|
|
|
does not need the trick, the :code-tex:`\\sphinxAtStartPar` does nothing.
|
2021-01-29 03:09:36 -06:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.5.0
|
|
|
|
|
|
2018-10-05 04:26:22 -05:00
|
|
|
|
- The section, subsection, ... headings are set using *titlesec*'s
|
2024-08-23 11:04:38 -05:00
|
|
|
|
:code-tex:`\\titleformat` command.
|
2018-10-05 04:26:22 -05:00
|
|
|
|
|
|
|
|
|
- For the ``'manual'`` docclass, the chapter headings can be customized using
|
2024-08-23 11:04:38 -05:00
|
|
|
|
*fncychap*'s commands :code-tex:`\\ChNameVar`, :code-tex:`\\ChNumVar`,
|
|
|
|
|
:code-tex:`\\ChTitleVar`. File :file:`sphinx.sty` has custom re-definitions in
|
|
|
|
|
case of *fncychap* option ``Bjarne``.
|
2017-06-05 05:11:41 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 1.5
|
2018-10-05 04:26:22 -05:00
|
|
|
|
Formerly, use of *fncychap* with other styles than ``Bjarne`` was
|
2017-06-05 05:11:41 -05:00
|
|
|
|
dysfunctional.
|
2016-10-29 09:30:33 -05:00
|
|
|
|
|
2024-08-17 13:33:15 -05:00
|
|
|
|
- The :dudir:`role` directive allows to mark inline text with class arguments.
|
2024-08-23 11:04:38 -05:00
|
|
|
|
This is handled in LaTeX output via the :code-tex:`\\DUrole` dispatcher
|
|
|
|
|
command `as in Docutils <classarguments_>`_. Object signatures also use
|
|
|
|
|
:code-tex:`\\DUrole` for some components, with one or two-letters class
|
|
|
|
|
names as in HTML output.
|
2024-08-17 13:33:15 -05:00
|
|
|
|
|
|
|
|
|
.. versionchanged:: 8.1.0
|
|
|
|
|
When multiple classes are injected via a a custom role, the LaTeX output
|
2024-08-23 11:04:38 -05:00
|
|
|
|
uses nested :code-tex:`\\DUrole`'s as in the `Docutils documentation
|
|
|
|
|
<classarguments_>`_. Formerly it used a single :code-tex:`\\DUrole` with
|
|
|
|
|
comma separated classes, making the LaTeX customization more arduous.
|
2024-08-17 13:33:15 -05:00
|
|
|
|
|
|
|
|
|
.. _classarguments: https://docutils.sourceforge.io/docs/user/latex.html#custom-interpreted-text-roles
|
|
|
|
|
|
2022-10-12 10:15:40 -05:00
|
|
|
|
.. _latexcontainer:
|
|
|
|
|
|
2021-07-19 05:07:03 -05:00
|
|
|
|
- Docutils :dudir:`container` directives are supported in LaTeX output: to
|
|
|
|
|
let a container class with name ``foo`` influence the final PDF via LaTeX,
|
|
|
|
|
it is only needed to define in the preamble an environment
|
|
|
|
|
``sphinxclassfoo``. A simple example would be:
|
|
|
|
|
|
|
|
|
|
.. code-block:: latex
|
|
|
|
|
|
|
|
|
|
\newenvironment{sphinxclassred}{\color{red}}{}
|
|
|
|
|
|
2024-07-10 15:43:14 -05:00
|
|
|
|
Currently the class names must contain only ASCII characters and avoid
|
2021-07-19 05:07:03 -05:00
|
|
|
|
characters special to LaTeX such as ``\``.
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 4.1.0
|
|
|
|
|
|
2016-08-17 08:52:42 -05:00
|
|
|
|
.. hint::
|
|
|
|
|
|
|
|
|
|
As an experimental feature, Sphinx can use user-defined template file for
|
2024-04-23 04:40:24 -05:00
|
|
|
|
LaTeX source if you have a file named ``_templates/latex.tex.jinja`` in your
|
2017-05-11 15:50:58 -05:00
|
|
|
|
project.
|
2016-08-17 08:52:42 -05:00
|
|
|
|
|
2024-04-23 04:40:24 -05:00
|
|
|
|
Additional files ``longtable.tex.jinja``, ``tabulary.tex.jinja`` and
|
|
|
|
|
``tabular.tex.jinja`` can be added to ``_templates/`` to configure some
|
|
|
|
|
aspects of table rendering (such as the caption position).
|
2017-05-11 15:50:58 -05:00
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.6
|
|
|
|
|
currently all template variables are unstable and undocumented.
|
2016-10-29 09:30:33 -05:00
|
|
|
|
|
2024-04-23 04:40:24 -05:00
|
|
|
|
.. versionchanged:: 7.4
|
|
|
|
|
Added support for the ``.jinja`` file extension, which is preferred.
|
|
|
|
|
The old file names remain supported.
|
|
|
|
|
(``latex.tex_t``, ``longtable.tex_t``, ``tabulary.tex_t``, and ``tabular.tex_t``)
|
|
|
|
|
|
2016-10-29 09:30:33 -05:00
|
|
|
|
.. raw:: latex
|
|
|
|
|
|
|
|
|
|
\endgroup
|