Sphinx 8.0.1__py3-none-any.whl → 8.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +6 -3
- sphinx/_cli/__init__.py +40 -20
- sphinx/_cli/util/colour.py +5 -4
- sphinx/_cli/util/errors.py +28 -11
- sphinx/application.py +361 -38
- sphinx/builders/__init__.py +229 -83
- sphinx/builders/_epub_base.py +118 -71
- sphinx/builders/changes.py +39 -21
- sphinx/builders/dirhtml.py +4 -4
- sphinx/builders/dummy.py +2 -5
- sphinx/builders/epub3.py +43 -22
- sphinx/builders/gettext.py +43 -25
- sphinx/builders/html/__init__.py +284 -218
- sphinx/builders/html/_assets.py +62 -26
- sphinx/builders/html/_build_info.py +76 -0
- sphinx/builders/html/transforms.py +11 -9
- sphinx/builders/latex/__init__.py +139 -81
- sphinx/builders/latex/constants.py +7 -7
- sphinx/builders/latex/nodes.py +3 -2
- sphinx/builders/latex/theming.py +7 -5
- sphinx/builders/latex/transforms.py +27 -19
- sphinx/builders/linkcheck.py +146 -72
- sphinx/builders/manpage.py +30 -13
- sphinx/builders/singlehtml.py +22 -14
- sphinx/builders/texinfo.py +67 -37
- sphinx/builders/text.py +5 -5
- sphinx/builders/xml.py +6 -9
- sphinx/cmd/build.py +282 -103
- sphinx/cmd/make_mode.py +106 -63
- sphinx/cmd/quickstart.py +341 -145
- sphinx/config.py +45 -12
- sphinx/deprecation.py +8 -2
- sphinx/directives/__init__.py +28 -19
- sphinx/directives/code.py +86 -56
- sphinx/directives/other.py +50 -36
- sphinx/directives/patches.py +29 -19
- sphinx/domains/__init__.py +20 -120
- sphinx/domains/_domains_container.py +281 -0
- sphinx/domains/_index.py +110 -0
- sphinx/domains/c/__init__.py +3 -3
- sphinx/domains/c/_parser.py +10 -6
- sphinx/domains/changeset.py +5 -3
- sphinx/domains/citation.py +5 -3
- sphinx/domains/cpp/__init__.py +9 -11
- sphinx/domains/cpp/_parser.py +8 -7
- sphinx/domains/index.py +3 -3
- sphinx/domains/javascript.py +12 -7
- sphinx/domains/math.py +2 -2
- sphinx/domains/python/__init__.py +10 -5
- sphinx/domains/python/_object.py +1 -1
- sphinx/domains/rst.py +5 -5
- sphinx/domains/std/__init__.py +16 -11
- sphinx/environment/__init__.py +206 -146
- sphinx/environment/adapters/asset.py +3 -2
- sphinx/environment/adapters/indexentries.py +74 -33
- sphinx/environment/adapters/toctree.py +100 -43
- sphinx/environment/collectors/__init__.py +19 -8
- sphinx/environment/collectors/asset.py +47 -15
- sphinx/environment/collectors/dependencies.py +8 -4
- sphinx/environment/collectors/metadata.py +7 -2
- sphinx/environment/collectors/title.py +7 -2
- sphinx/environment/collectors/toctree.py +54 -22
- sphinx/errors.py +4 -1
- sphinx/events.py +314 -7
- sphinx/ext/apidoc.py +42 -18
- sphinx/ext/autodoc/__init__.py +52 -24
- sphinx/ext/autodoc/importer.py +6 -9
- sphinx/ext/autosectionlabel.py +1 -2
- sphinx/ext/autosummary/__init__.py +3 -1
- sphinx/ext/autosummary/generate.py +28 -14
- sphinx/ext/coverage.py +7 -7
- sphinx/ext/doctest.py +4 -8
- sphinx/ext/duration.py +6 -5
- sphinx/ext/inheritance_diagram.py +1 -1
- sphinx/ext/intersphinx/_cli.py +6 -4
- sphinx/ext/intersphinx/_load.py +77 -32
- sphinx/ext/intersphinx/_resolve.py +173 -79
- sphinx/ext/intersphinx/_shared.py +7 -5
- sphinx/ext/linkcode.py +7 -1
- sphinx/ext/mathjax.py +1 -2
- sphinx/ext/napoleon/__init__.py +37 -24
- sphinx/ext/napoleon/docstring.py +202 -134
- sphinx/ext/todo.py +5 -3
- sphinx/highlighting.py +10 -3
- sphinx/io.py +1 -1
- sphinx/jinja2glue.py +27 -6
- sphinx/locale/__init__.py +6 -2
- sphinx/locale/ar/LC_MESSAGES/sphinx.js +8 -1
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +2246 -2288
- sphinx/locale/bg/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/bn/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +2349 -2395
- sphinx/locale/ca/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +2846 -2892
- sphinx/locale/cak/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +2213 -2259
- sphinx/locale/cs/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +2225 -2269
- sphinx/locale/cy/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +2403 -2447
- sphinx/locale/da/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +2214 -2260
- sphinx/locale/de/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +2230 -2276
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/el/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +2619 -2665
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +2519 -2565
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/eo/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +2232 -2278
- sphinx/locale/es/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +2516 -2561
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +2114 -2159
- sphinx/locale/et/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +2317 -2363
- sphinx/locale/eu/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +2218 -2264
- sphinx/locale/fa/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +2505 -2551
- sphinx/locale/fi/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +2303 -2349
- sphinx/locale/fr/LC_MESSAGES/sphinx.js +6 -2
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +2863 -2908
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +2114 -2159
- sphinx/locale/gl/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +2571 -2617
- sphinx/locale/he/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +2307 -2352
- sphinx/locale/hi/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +2580 -2626
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/hr/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +2238 -2283
- sphinx/locale/hu/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +2228 -2274
- sphinx/locale/id/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +2787 -2834
- sphinx/locale/is/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +2224 -2270
- sphinx/locale/it/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +2231 -2276
- sphinx/locale/ja/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +2507 -2554
- sphinx/locale/ka/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +2428 -2474
- sphinx/locale/ko/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +2516 -2563
- sphinx/locale/lt/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +2425 -2469
- sphinx/locale/lv/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +2362 -2407
- sphinx/locale/mk/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +2121 -2167
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +2220 -2266
- sphinx/locale/ne/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +2221 -2267
- sphinx/locale/nl/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +2240 -2286
- sphinx/locale/pl/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +2319 -2363
- sphinx/locale/pt/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +2114 -2159
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +2854 -2899
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +2224 -2269
- sphinx/locale/ro/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +2226 -2271
- sphinx/locale/ru/LC_MESSAGES/sphinx.js +8 -3
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +2841 -2885
- sphinx/locale/si/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +2294 -2340
- sphinx/locale/sk/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +2497 -2541
- sphinx/locale/sl/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +2331 -2375
- sphinx/locale/sphinx.pot +2121 -2167
- sphinx/locale/sq/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +2855 -2901
- sphinx/locale/sr/LC_MESSAGES/sphinx.js +5 -1
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +2203 -2248
- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +2423 -2469
- sphinx/locale/te/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/tr/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +2443 -2489
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js +6 -1
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +2329 -2373
- sphinx/locale/ur/LC_MESSAGES/sphinx.js +4 -1
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +2113 -2159
- sphinx/locale/vi/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +2199 -2246
- sphinx/locale/yue/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +2112 -2159
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +2112 -2159
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +2845 -2892
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.js +3 -1
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +2112 -2159
- sphinx/parsers.py +3 -1
- sphinx/project.py +6 -2
- sphinx/pycode/__init__.py +11 -4
- sphinx/pycode/ast.py +58 -58
- sphinx/pycode/parser.py +49 -28
- sphinx/pygments_styles.py +49 -49
- sphinx/registry.py +8 -3
- sphinx/roles.py +133 -13
- sphinx/search/__init__.py +146 -87
- sphinx/search/da.py +2 -4
- sphinx/search/de.py +2 -4
- sphinx/search/en.py +4 -4
- sphinx/search/es.py +2 -4
- sphinx/search/fi.py +2 -4
- sphinx/search/fr.py +2 -4
- sphinx/search/hu.py +2 -4
- sphinx/search/it.py +2 -4
- sphinx/search/ja.py +55 -32
- sphinx/search/nl.py +2 -4
- sphinx/search/no.py +2 -4
- sphinx/search/pt.py +2 -4
- sphinx/search/ro.py +0 -2
- sphinx/search/ru.py +2 -4
- sphinx/search/sv.py +2 -4
- sphinx/search/tr.py +0 -2
- sphinx/search/zh.py +18 -13
- sphinx/templates/graphviz/graphviz.css +0 -7
- sphinx/testing/fixtures.py +6 -5
- sphinx/testing/path.py +7 -5
- sphinx/testing/util.py +63 -29
- sphinx/texinputs/sphinx.sty +107 -39
- sphinx/texinputs/sphinxlatexadmonitions.sty +51 -35
- sphinx/texinputs/sphinxlatexcontainers.sty +1 -1
- sphinx/texinputs/sphinxlatexgraphics.sty +3 -2
- sphinx/texinputs/sphinxlatexindbibtoc.sty +1 -1
- sphinx/texinputs/sphinxlatexlists.sty +1 -1
- sphinx/texinputs/sphinxlatexliterals.sty +4 -1
- sphinx/texinputs/sphinxlatexnumfig.sty +22 -9
- sphinx/texinputs/sphinxlatexobjects.sty +1 -1
- sphinx/texinputs/sphinxlatexshadowbox.sty +72 -10
- sphinx/texinputs/sphinxlatexstyleheadings.sty +7 -2
- sphinx/texinputs/sphinxlatexstylepage.sty +2 -8
- sphinx/texinputs/sphinxlatexstyletext.sty +2 -4
- sphinx/texinputs/sphinxlatextables.sty +1 -1
- sphinx/texinputs/sphinxoptionsgeometry.sty +1 -1
- sphinx/texinputs/sphinxoptionshyperref.sty +1 -1
- sphinx/themes/agogo/layout.html +1 -10
- sphinx/themes/agogo/static/agogo.css.jinja +0 -7
- sphinx/themes/basic/defindex.html +1 -8
- sphinx/themes/basic/domainindex.html +1 -9
- sphinx/themes/basic/genindex-single.html +1 -9
- sphinx/themes/basic/genindex-split.html +1 -9
- sphinx/themes/basic/genindex.html +1 -9
- sphinx/themes/basic/globaltoc.html +1 -9
- sphinx/themes/basic/layout.html +1 -9
- sphinx/themes/basic/localtoc.html +1 -9
- sphinx/themes/basic/page.html +1 -9
- sphinx/themes/basic/relations.html +1 -9
- sphinx/themes/basic/search.html +1 -9
- sphinx/themes/basic/searchbox.html +1 -9
- sphinx/themes/basic/searchfield.html +4 -10
- sphinx/themes/basic/sourcelink.html +1 -9
- sphinx/themes/basic/static/basic.css.jinja +2 -13
- sphinx/themes/basic/static/doctools.js +0 -7
- sphinx/themes/basic/static/language_data.js.jinja +0 -7
- sphinx/themes/basic/static/searchtools.js +25 -13
- sphinx/themes/bizstyle/layout.html +1 -9
- sphinx/themes/bizstyle/static/bizstyle.css.jinja +0 -7
- sphinx/themes/bizstyle/static/bizstyle.js.jinja +5 -11
- sphinx/themes/classic/layout.html +1 -9
- sphinx/themes/classic/static/classic.css.jinja +0 -7
- sphinx/themes/classic/static/sidebar.js.jinja +0 -6
- sphinx/themes/epub/epub-cover.html +1 -9
- sphinx/themes/epub/layout.html +1 -9
- sphinx/themes/epub/static/epub.css.jinja +0 -7
- sphinx/themes/haiku/layout.html +1 -9
- sphinx/themes/haiku/static/haiku.css.jinja +0 -6
- sphinx/themes/nature/static/nature.css.jinja +0 -7
- sphinx/themes/nonav/layout.html +1 -9
- sphinx/themes/nonav/static/nonav.css.jinja +0 -7
- sphinx/themes/pyramid/static/epub.css.jinja +0 -7
- sphinx/themes/pyramid/static/pyramid.css.jinja +0 -7
- sphinx/themes/scrolls/layout.html +1 -10
- sphinx/themes/scrolls/static/scrolls.css.jinja +0 -7
- sphinx/themes/sphinxdoc/static/sphinxdoc.css.jinja +2 -7
- sphinx/themes/traditional/static/traditional.css.jinja +0 -7
- sphinx/theming.py +18 -6
- sphinx/transforms/__init__.py +56 -35
- sphinx/transforms/compact_bullet_list.py +3 -2
- sphinx/transforms/i18n.py +132 -50
- sphinx/transforms/post_transforms/__init__.py +94 -43
- sphinx/transforms/post_transforms/code.py +7 -6
- sphinx/transforms/post_transforms/images.py +71 -54
- sphinx/transforms/references.py +1 -2
- sphinx/util/__init__.py +23 -194
- sphinx/util/_files.py +80 -0
- sphinx/util/_importer.py +27 -0
- sphinx/util/_io.py +1 -2
- sphinx/util/_lines.py +26 -0
- sphinx/util/_pathlib.py +5 -2
- sphinx/util/_serialise.py +53 -0
- sphinx/util/_timestamps.py +2 -1
- sphinx/util/_uri.py +16 -0
- sphinx/util/cfamily.py +48 -25
- sphinx/util/console.py +1 -0
- sphinx/util/display.py +1 -1
- sphinx/util/docfields.py +125 -45
- sphinx/util/docstrings.py +1 -1
- sphinx/util/docutils.py +118 -44
- sphinx/util/exceptions.py +11 -5
- sphinx/util/fileutil.py +53 -32
- sphinx/util/http_date.py +9 -7
- sphinx/util/i18n.py +49 -16
- sphinx/util/images.py +7 -6
- sphinx/util/inspect.py +29 -12
- sphinx/util/inventory.py +47 -29
- sphinx/util/logging.py +58 -85
- sphinx/util/matching.py +3 -3
- sphinx/util/math.py +1 -1
- sphinx/util/nodes.py +176 -108
- sphinx/util/osutil.py +13 -10
- sphinx/util/parallel.py +5 -4
- sphinx/util/parsing.py +5 -3
- sphinx/util/png.py +3 -3
- sphinx/util/requests.py +8 -4
- sphinx/util/rst.py +5 -3
- sphinx/util/tags.py +5 -2
- sphinx/util/template.py +26 -11
- sphinx/util/texescape.py +2 -2
- sphinx/util/typing.py +89 -38
- sphinx/versioning.py +3 -1
- sphinx/writers/html.py +22 -7
- sphinx/writers/html5.py +113 -64
- sphinx/writers/latex.py +408 -221
- sphinx/writers/manpage.py +25 -15
- sphinx/writers/texinfo.py +94 -82
- sphinx/writers/text.py +87 -53
- sphinx/writers/xml.py +5 -4
- sphinx-8.1.0.dist-info/LICENSE.rst +31 -0
- {sphinx-8.0.1.dist-info → sphinx-8.1.0.dist-info}/METADATA +13 -11
- sphinx-8.1.0.dist-info/RECORD +598 -0
- sphinx-8.0.1.dist-info/LICENSE.rst +0 -67
- sphinx-8.0.1.dist-info/RECORD +0 -590
- {sphinx-8.0.1.dist-info → sphinx-8.1.0.dist-info}/WHEEL +0 -0
- {sphinx-8.0.1.dist-info → sphinx-8.1.0.dist-info}/entry_points.txt +0 -0
sphinx/testing/util.py
CHANGED
|
@@ -29,7 +29,7 @@ if TYPE_CHECKING:
|
|
|
29
29
|
from docutils.nodes import Node
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def assert_node(node: Node, cls: Any = None, xpath: str =
|
|
32
|
+
def assert_node(node: Node, cls: Any = None, xpath: str = '', **kwargs: Any) -> None:
|
|
33
33
|
if cls:
|
|
34
34
|
if isinstance(cls, list):
|
|
35
35
|
assert_node(node, cls[0], xpath=xpath, **kwargs)
|
|
@@ -37,36 +37,43 @@ def assert_node(node: Node, cls: Any = None, xpath: str = "", **kwargs: Any) ->
|
|
|
37
37
|
if isinstance(cls[1], tuple):
|
|
38
38
|
assert_node(node, cls[1], xpath=xpath, **kwargs)
|
|
39
39
|
else:
|
|
40
|
-
assert
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
assert (
|
|
41
|
+
isinstance(node, nodes.Element)
|
|
42
|
+
), f'The node{xpath} does not have any children' # fmt: skip
|
|
43
|
+
assert (
|
|
44
|
+
len(node) == 1
|
|
45
|
+
), f'The node{xpath} has {len(node)} child nodes, not one'
|
|
46
|
+
assert_node(node[0], cls[1:], xpath=xpath + '[0]', **kwargs)
|
|
45
47
|
elif isinstance(cls, tuple):
|
|
46
|
-
assert
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
assert (
|
|
49
|
+
isinstance(node, list | nodes.Element)
|
|
50
|
+
), f'The node{xpath} does not have any items' # fmt: skip
|
|
51
|
+
assert (
|
|
52
|
+
len(node) == len(cls)
|
|
53
|
+
), f'The node{xpath} has {len(node)} child nodes, not {len(cls)!r}' # fmt: skip
|
|
50
54
|
for i, nodecls in enumerate(cls):
|
|
51
|
-
path = xpath +
|
|
55
|
+
path = xpath + f'[{i}]'
|
|
52
56
|
assert_node(node[i], nodecls, xpath=path, **kwargs)
|
|
53
57
|
elif isinstance(cls, str):
|
|
54
58
|
assert node == cls, f'The node {xpath!r} is not {cls!r}: {node!r}'
|
|
55
59
|
else:
|
|
56
|
-
assert
|
|
57
|
-
|
|
60
|
+
assert (
|
|
61
|
+
isinstance(node, cls)
|
|
62
|
+
), f'The node{xpath} is not subclass of {cls!r}: {node!r}' # fmt: skip
|
|
58
63
|
|
|
59
64
|
if kwargs:
|
|
60
|
-
assert
|
|
61
|
-
|
|
65
|
+
assert (
|
|
66
|
+
isinstance(node, nodes.Element)
|
|
67
|
+
), f'The node{xpath} does not have any attributes' # fmt: skip
|
|
62
68
|
|
|
63
69
|
for key, value in kwargs.items():
|
|
64
70
|
if key not in node:
|
|
65
71
|
if (key := key.replace('_', '-')) not in node:
|
|
66
72
|
msg = f'The node{xpath} does not have {key!r} attribute: {node!r}'
|
|
67
73
|
raise AssertionError(msg)
|
|
68
|
-
assert
|
|
69
|
-
|
|
74
|
+
assert (
|
|
75
|
+
node[key] == value
|
|
76
|
+
), f'The node{xpath}[{key}] is not {value!r}: {node[key]!r}'
|
|
70
77
|
|
|
71
78
|
|
|
72
79
|
# keep this to restrict the API usage and to have a correct return type
|
|
@@ -86,7 +93,7 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
86
93
|
|
|
87
94
|
It is recommended to use::
|
|
88
95
|
|
|
89
|
-
@pytest.mark.sphinx('html')
|
|
96
|
+
@pytest.mark.sphinx('html', testroot='root')
|
|
90
97
|
def test(app):
|
|
91
98
|
app = ...
|
|
92
99
|
|
|
@@ -117,11 +124,14 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
117
124
|
parallel: int = 0,
|
|
118
125
|
# additional arguments at the end to keep the signature
|
|
119
126
|
verbosity: int = 0, # argument is not in the same order as in the superclass
|
|
120
|
-
keep_going: bool = False,
|
|
121
127
|
warningiserror: bool = False, # argument is not in the same order as in the superclass
|
|
128
|
+
pdb: bool = False,
|
|
129
|
+
exception_on_warning: bool = False,
|
|
122
130
|
# unknown keyword arguments
|
|
123
131
|
**extras: Any,
|
|
124
132
|
) -> None:
|
|
133
|
+
self._builder_name = buildername
|
|
134
|
+
|
|
125
135
|
assert srcdir is not None
|
|
126
136
|
|
|
127
137
|
if verbosity == -1:
|
|
@@ -135,7 +145,7 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
135
145
|
# but allow the stream to be /dev/null by passing verbosity=-1
|
|
136
146
|
status = None if quiet else StringIO()
|
|
137
147
|
elif not isinstance(status, StringIO):
|
|
138
|
-
err = "
|
|
148
|
+
err = f"'status' must be an io.StringIO object, got: {type(status)}"
|
|
139
149
|
raise TypeError(err)
|
|
140
150
|
|
|
141
151
|
if warning is None:
|
|
@@ -143,7 +153,7 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
143
153
|
# but allow the stream to be /dev/null by passing verbosity=-1
|
|
144
154
|
warning = None if quiet else StringIO()
|
|
145
155
|
elif not isinstance(warning, StringIO):
|
|
146
|
-
err = '
|
|
156
|
+
err = f"'warning' must be an io.StringIO object, got: {type(warning)}"
|
|
147
157
|
raise TypeError(err)
|
|
148
158
|
|
|
149
159
|
self.docutils_conf_path = srcdir / 'docutils.conf'
|
|
@@ -167,16 +177,36 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
167
177
|
|
|
168
178
|
try:
|
|
169
179
|
super().__init__(
|
|
170
|
-
srcdir,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
srcdir,
|
|
181
|
+
confdir,
|
|
182
|
+
outdir,
|
|
183
|
+
doctreedir,
|
|
184
|
+
buildername,
|
|
185
|
+
confoverrides=confoverrides,
|
|
186
|
+
status=status,
|
|
187
|
+
warning=warning,
|
|
188
|
+
freshenv=freshenv,
|
|
189
|
+
warningiserror=warningiserror,
|
|
190
|
+
tags=tags,
|
|
191
|
+
verbosity=verbosity,
|
|
192
|
+
parallel=parallel,
|
|
193
|
+
pdb=pdb,
|
|
194
|
+
exception_on_warning=exception_on_warning,
|
|
175
195
|
)
|
|
176
196
|
except Exception:
|
|
177
197
|
self.cleanup()
|
|
178
198
|
raise
|
|
179
199
|
|
|
200
|
+
def _init_builder(self) -> None:
|
|
201
|
+
# override the default theme to 'basic' rather than 'alabaster'
|
|
202
|
+
# for test independence
|
|
203
|
+
|
|
204
|
+
if 'html_theme' in self.config._overrides:
|
|
205
|
+
pass # respect overrides
|
|
206
|
+
elif 'html_theme' in self.config and self.config.html_theme == 'alabaster':
|
|
207
|
+
self.config.html_theme = self.config._overrides.get('html_theme', 'basic')
|
|
208
|
+
super()._init_builder()
|
|
209
|
+
|
|
180
210
|
@property
|
|
181
211
|
def status(self) -> StringIO:
|
|
182
212
|
"""The in-memory text I/O for the application status messages."""
|
|
@@ -198,9 +228,11 @@ class SphinxTestApp(sphinx.application.Sphinx):
|
|
|
198
228
|
os.remove(self.docutils_conf_path)
|
|
199
229
|
|
|
200
230
|
def __repr__(self) -> str:
|
|
201
|
-
return f'<{self.__class__.__name__} buildername={self.
|
|
231
|
+
return f'<{self.__class__.__name__} buildername={self._builder_name!r}>'
|
|
202
232
|
|
|
203
|
-
def build(
|
|
233
|
+
def build(
|
|
234
|
+
self, force_all: bool = False, filenames: list[str] | None = None
|
|
235
|
+
) -> None:
|
|
204
236
|
self.env._pickled_doctree_cache.clear()
|
|
205
237
|
super().build(force_all, filenames)
|
|
206
238
|
|
|
@@ -212,7 +244,9 @@ class SphinxTestAppWrapperForSkipBuilding(SphinxTestApp):
|
|
|
212
244
|
if it has already been built and there are any output files.
|
|
213
245
|
"""
|
|
214
246
|
|
|
215
|
-
def build(
|
|
247
|
+
def build(
|
|
248
|
+
self, force_all: bool = False, filenames: list[str] | None = None
|
|
249
|
+
) -> None:
|
|
216
250
|
if not os.listdir(self.outdir):
|
|
217
251
|
# if listdir is empty, do build.
|
|
218
252
|
super().build(force_all, filenames)
|
sphinx/texinputs/sphinx.sty
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
% by the Sphinx LaTeX writer.
|
|
10
10
|
|
|
11
11
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
|
12
|
-
\ProvidesPackage{sphinx}[2024/07/
|
|
12
|
+
\ProvidesPackage{sphinx}[2024/07/28 v8.1.0 Sphinx LaTeX package (sphinx-doc)]
|
|
13
13
|
|
|
14
14
|
% provides \ltx@ifundefined
|
|
15
15
|
% (many packages load ltxcmds: graphicx does for pdftex and lualatex but
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
\DeclareStringOption[-1]{numfigreset}
|
|
157
157
|
\DeclareBoolOption[false]{nonumfigreset}
|
|
158
158
|
\DeclareBoolOption[false]{mathnumfig}
|
|
159
|
+
\DeclareStringOption[.]{mathnumsep}
|
|
159
160
|
\define@key{sphinx}{bookmarksdepth}{\AtBeginDocument{\hypersetup{bookmarksdepth=#1}}}
|
|
160
161
|
\AtBeginDocument{\define@key{sphinx}{bookmarksdepth}{\hypersetup{bookmarksdepth=#1}}}
|
|
161
162
|
% \DeclareBoolOption[false]{usespart}% not used
|
|
@@ -350,6 +351,11 @@
|
|
|
350
351
|
% is handled as an admonition with the same customizability. And the
|
|
351
352
|
% todo directive.
|
|
352
353
|
%
|
|
354
|
+
% 8.1.0: style separately topic, contents, and sidebar directives
|
|
355
|
+
% ---------------------------------------------------------------
|
|
356
|
+
%
|
|
357
|
+
% And use some title row also for them (but without icon, per default).
|
|
358
|
+
%
|
|
353
359
|
\def\spxstring@none{none}
|
|
354
360
|
\def\spxstring@clone{clone}
|
|
355
361
|
%
|
|
@@ -397,6 +403,15 @@
|
|
|
397
403
|
% macro prefix option prefix legacy option init value
|
|
398
404
|
\spx@tempa{spx@pre@} {pre_} {verbatimborder} {0.4pt}
|
|
399
405
|
\spx@tempa{spx@topic@} {div.topic_} {shadowrule} {0.5pt}% mod. at 7.4.0
|
|
406
|
+
\spx@tempa{spx@contents@} {div.contents_} {shadowrule} {0.5pt}% 8.1.0
|
|
407
|
+
\spx@tempa{spx@sidebar@} {div.sidebar_} {shadowrule} {1pt}% 8.1.0
|
|
408
|
+
% let legacy shadowrule key set all topic/contents/sidebar border
|
|
409
|
+
% keys to the common value given by user to shadowrule
|
|
410
|
+
\def\KV@sphinx@shadowrule #1{%
|
|
411
|
+
\@nameuse{KV@sphinx@div.topic_border-width}{#1}%
|
|
412
|
+
\@nameuse{KV@sphinx@div.contents_border-width}{#1}%
|
|
413
|
+
\@nameuse{KV@sphinx@div.sidebar_border-width}{#1}%
|
|
414
|
+
}%
|
|
400
415
|
\spx@tempa{spx@note@} {div.note_} {noteborder} {0.5pt}
|
|
401
416
|
\spx@tempa{spx@hint@} {div.hint_} {hintborder} {0.5pt}
|
|
402
417
|
\spx@tempa{spx@important@}{div.important_}{importantborder}{0.5pt}
|
|
@@ -444,9 +459,13 @@
|
|
|
444
459
|
% In order for perfect exact same vertical alignment of contents from all such
|
|
445
460
|
% directives, the value of horizontal border-width+padding is kept constant
|
|
446
461
|
% (equal to 7.5pt since 7.4.0).
|
|
462
|
+
% 8.1.0 styles separately topic, contents, and sidebar.
|
|
447
463
|
% #1 macro prefix #6 option prefix top right bottom left
|
|
448
464
|
\spx@tempa{spx@pre@} {pre_} {3pt}{3pt}{3pt}{3pt}
|
|
449
|
-
\spx@tempa{spx@topic@} {div.topic_} {
|
|
465
|
+
\spx@tempa{spx@topic@} {div.topic_} {6pt}{7pt}{6pt}{7pt}% mod. at 8.1.0
|
|
466
|
+
% contents styling inherits at 8.1.0 the former 7.4.0 topic defaults
|
|
467
|
+
\spx@tempa{spx@contents@} {div.contents_} {10pt}{7pt}{12pt}{7pt}% 8.1.0
|
|
468
|
+
\spx@tempa{spx@sidebar@} {div.sidebar_} {6pt}{6.5pt}{6pt}{6.5pt}% 8.1.0
|
|
450
469
|
% 7.4.0 drops legacy settings which linked strangely padding with border width
|
|
451
470
|
\spx@tempa{spx@note@} {div.note_} {6pt}{7pt}{6pt}{7pt}
|
|
452
471
|
\spx@tempa{spx@hint@} {div.hint_} {6pt}{7pt}{6pt}{7pt}
|
|
@@ -462,8 +481,13 @@
|
|
|
462
481
|
\spx@tempa{spx@box@} {box_} {3pt}{3pt}{3pt}{3pt}
|
|
463
482
|
% define legacy verbatimsep key as alias of pre_padding key
|
|
464
483
|
\expandafter\let\expandafter\KV@sphinx@verbatimsep\csname KV@sphinx@pre_padding\endcsname
|
|
465
|
-
%
|
|
466
|
-
|
|
484
|
+
% let legacy shadowsep key set all topic/contents/sidebar padding
|
|
485
|
+
% keys to the common value given by user to shadosep
|
|
486
|
+
\def\KV@sphinx@shadowsep #1{%
|
|
487
|
+
\@nameuse{KV@sphinx@div.topic_padding}{#1}%
|
|
488
|
+
\@nameuse{KV@sphinx@div.contents_padding}{#1}%
|
|
489
|
+
\@nameuse{KV@sphinx@div.sidebar_padding}{#1}%
|
|
490
|
+
}%
|
|
467
491
|
|
|
468
492
|
% Corner radii keys
|
|
469
493
|
%
|
|
@@ -491,9 +515,16 @@
|
|
|
491
515
|
% - the 3pt is used (which is normal value of \fboxsep).
|
|
492
516
|
% - some admonitions use rounded corners as well.
|
|
493
517
|
% - topic boxed have only their bottom right corner rounded.
|
|
518
|
+
% At 8.1.0 topic, contents and sidebar separately styled.
|
|
494
519
|
% macro prefix option prefix tl tr br bl
|
|
495
520
|
\spx@tempa{spx@pre@} {pre_} {3pt}{3pt}{3pt}{3pt}
|
|
496
|
-
|
|
521
|
+
% use four rounded corners (and no shadow) for topic at 8.1.0
|
|
522
|
+
\spx@tempa{spx@topic@} {div.topic_} {8pt}{8pt}{8pt}{8pt}
|
|
523
|
+
% contents inherits at 8.1.0 the 7.4.0 former styling of topic
|
|
524
|
+
\spx@tempa{spx@contents@} {div.contents_} \z@ \z@ {12pt} \z@
|
|
525
|
+
% make sidebard distinctive as we can't really safely implement
|
|
526
|
+
% it with text flowing around it, but rather as a full width block
|
|
527
|
+
\spx@tempa{spx@sidebar@} {div.sidebar_} {12pt}\z@ {12pt} \z@
|
|
497
528
|
\spx@tempa{spx@note@} {div.note_} {5pt}{5pt}{5pt}{5pt}
|
|
498
529
|
\spx@tempa{spx@hint@} {div.hint_} {5pt}{5pt}{5pt}{5pt}
|
|
499
530
|
\spx@tempa{spx@important@}{div.important_} \z@\z@\z@\z@
|
|
@@ -522,6 +553,8 @@
|
|
|
522
553
|
% macro prefix
|
|
523
554
|
\spx@tempa{spx@pre@}
|
|
524
555
|
\spx@tempa{spx@topic@}
|
|
556
|
+
\spx@tempa{spx@contents@}% 8.1.0
|
|
557
|
+
\spx@tempa{spx@sidebar@}% 8.1.0
|
|
525
558
|
\spx@tempa{spx@note@}
|
|
526
559
|
\spx@tempa{spx@hint@}
|
|
527
560
|
\spx@tempa{spx@important@}
|
|
@@ -555,13 +588,10 @@
|
|
|
555
588
|
% used here. Since 6.2.0, expansion is delayed to time of use as for
|
|
556
589
|
% the other dimensions handled above. This is synched with an added
|
|
557
590
|
% encapsulation in \dimexpr...\relax by the "setup" from
|
|
558
|
-
% sphinxpackageboxes.sty.
|
|
559
|
-
% the sphinxShadowBox environment as it was using in an \ifdim the
|
|
560
|
-
% \spx@topic@shadow@yoffset macro, now holding by default 4pt+\z@
|
|
561
|
-
% rather than an already digested 262144sp. The +\z@ is in case ##2
|
|
562
|
-
% is empty.
|
|
591
|
+
% sphinxpackageboxes.sty.
|
|
563
592
|
\else #1%
|
|
564
|
-
\def#6{##1}
|
|
593
|
+
\def#6{##1}%
|
|
594
|
+
\if\relax\detokenize{##2}\relax\let#7#6\else\def#7{##2}\fi
|
|
565
595
|
\if\relax\detokenize{##3}\relax#4\else#3\fi
|
|
566
596
|
\fi
|
|
567
597
|
}%
|
|
@@ -569,8 +599,12 @@
|
|
|
569
599
|
}
|
|
570
600
|
\spx@tempa{spx@pre@} {pre_}
|
|
571
601
|
\spx@tempa{spx@topic@} {div.topic_}
|
|
572
|
-
|
|
573
|
-
|
|
602
|
+
\spx@tempa{spx@contents@} {div.contents_}
|
|
603
|
+
\spx@tempa{spx@sidebar@} {div.sidebar_}
|
|
604
|
+
% This corresponds to the legacy parameters for topic/contents/sidebar,
|
|
605
|
+
% but they are now only kept for contents
|
|
606
|
+
\spx@contents@shadow@setter 4pt 4pt {} \@nnil
|
|
607
|
+
% topic and sidebar default to no shadow
|
|
574
608
|
\spx@tempa{spx@note@} {div.note_}
|
|
575
609
|
\spx@tempa{spx@hint@} {div.hint_}
|
|
576
610
|
\spx@tempa{spx@important@}{div.important_}
|
|
@@ -584,18 +618,28 @@
|
|
|
584
618
|
\spx@tempa{spx@error@} {div.error_}
|
|
585
619
|
\spx@tempa{spx@box@} {box_}
|
|
586
620
|
|
|
587
|
-
% Support for legacy shadowsize (topic/contents)
|
|
621
|
+
% Support for legacy shadowsize (topic/contents/sidebar)
|
|
588
622
|
% This definition was broken due to a typo at 5.1.0 and got fixed at 6.1.2
|
|
589
623
|
% MEMO: at 6.2.0 this no longer does \number\dimexpr in an \edef. Reason is to
|
|
590
624
|
% keep in sync with div.topic_box-shadow handling of xoffset and yoffset.
|
|
591
625
|
\define@key{sphinx}{shadowsize}{%
|
|
592
626
|
\def\spx@topic@shadow@xoffset{#1}%
|
|
593
|
-
\let\spx@
|
|
627
|
+
\let\spx@contents@shadow@xoffset\spx@topic@shadow@xoffset
|
|
628
|
+
\let\spx@sidebar@shadow@xoffset \spx@topic@shadow@xoffset
|
|
629
|
+
\let\spx@topic@shadow@yoffset \spx@topic@shadow@xoffset
|
|
630
|
+
\let\spx@contents@shadow@yoffset\spx@topic@shadow@xoffset
|
|
631
|
+
\let\spx@sidebar@shadow@yoffset \spx@topic@shadow@xoffset
|
|
594
632
|
\ifdim\dimexpr\spx@topic@shadow@xoffset=\z@
|
|
595
633
|
\spx@topic@withshadowfalse
|
|
634
|
+
\spx@contents@withshadowfalse
|
|
635
|
+
\spx@sidebar@withshadowfalse
|
|
596
636
|
\else
|
|
597
637
|
\spx@topic@withshadowtrue
|
|
598
638
|
\spx@topic@insetshadowfalse
|
|
639
|
+
\spx@contents@withshadowtrue
|
|
640
|
+
\spx@contents@insetshadowfalse
|
|
641
|
+
\spx@sidebar@withshadowtrue
|
|
642
|
+
\spx@sidebar@insetshadowfalse
|
|
599
643
|
\fi
|
|
600
644
|
}%
|
|
601
645
|
|
|
@@ -638,6 +682,8 @@
|
|
|
638
682
|
% macro prefix
|
|
639
683
|
\spx@tempa{spx@pre@}
|
|
640
684
|
\spx@tempa{spx@topic@}
|
|
685
|
+
\spx@tempa{spx@contents@}
|
|
686
|
+
\spx@tempa{spx@sidebar@}
|
|
641
687
|
\spx@tempa{spx@note@}
|
|
642
688
|
\spx@tempa{spx@hint@}
|
|
643
689
|
\spx@tempa{spx@important@}
|
|
@@ -690,7 +736,11 @@
|
|
|
690
736
|
\csname KV@sphinx@pre_background-TeXcolor\endcsname
|
|
691
737
|
% (6.2.0 modified some internal namings for the colors of topic boxes)
|
|
692
738
|
% macro prefix option prefix color name prefix
|
|
693
|
-
|
|
739
|
+
% There was no legacy interface for topic/contents/sidebar
|
|
740
|
+
% 8.1.0 allows separate styling for topic/contents/sidebar
|
|
741
|
+
\spx@tempa{spx@topic@} {div.topic_} {sphinxtopic}
|
|
742
|
+
\spx@tempa{spx@contents@} {div.contents_} {sphinxcontents}
|
|
743
|
+
\spx@tempa{spx@sidebar@} {div.sidebar_} {sphinxsidebar}
|
|
694
744
|
\spx@tempa{spx@note@} {div.note_} {sphinxnote}
|
|
695
745
|
\spx@tempa{spx@hint@} {div.hint_} {sphinxhint}
|
|
696
746
|
\spx@tempa{spx@important@}{div.important_} {sphinximportant}
|
|
@@ -731,7 +781,7 @@
|
|
|
731
781
|
\spx@tempa{div.important_} {important}
|
|
732
782
|
\spx@tempa{div.tip_} {tip}
|
|
733
783
|
|
|
734
|
-
% Add "legacy" hintTeXextras etc...
|
|
784
|
+
% Add "legacy" hintTeXextras etc...
|
|
735
785
|
\def\spx@tempa#1#2{% #1 = CSS like option prefix, #2 = legacy option prefix
|
|
736
786
|
\expandafter\let\csname KV@sphinx@#2TeXextras\expandafter\endcsname
|
|
737
787
|
\csname KV@sphinx@#1TeXextras\endcsname
|
|
@@ -743,10 +793,19 @@
|
|
|
743
793
|
|
|
744
794
|
% At 7.4.0, let topic/contents boxes acquire background and border colours
|
|
745
795
|
% and give the shadow some colour other than black
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
796
|
+
% 8.1.0 styles separately topic/contents/sidebar
|
|
797
|
+
% topic has no shadow but we keep 7.4.0 color in case it gets needed
|
|
798
|
+
\setkeys{sphinx}{%
|
|
799
|
+
div.topic_border-TeXcolor=sphinx-admonition-bordercolor,
|
|
800
|
+
div.topic_background-TeXcolor=sphinx-admonition-bgcolor,
|
|
801
|
+
div.topic_box-shadow-TeXcolor={RGB}{108,108,108},
|
|
802
|
+
div.contents_border-TeXcolor=sphinx-admonition-bordercolor,
|
|
803
|
+
div.contents_background-TeXcolor=sphinx-admonition-bgcolor,
|
|
804
|
+
div.contents_box-shadow-TeXcolor={RGB}{108,108,108},
|
|
805
|
+
div.sidebar_border-TeXcolor=sphinx-admonition-bordercolor,
|
|
806
|
+
div.sidebar_background-TeXcolor=sphinx-admonition-bgcolor,
|
|
807
|
+
div.sidebar_box-shadow-TeXcolor=sphinx-admonition-bordercolor!80,% #9eacaf
|
|
808
|
+
}
|
|
750
809
|
|
|
751
810
|
|
|
752
811
|
% 7.4.0 lets all types of admonitions style especially their titlss.
|
|
@@ -799,15 +858,21 @@
|
|
|
799
858
|
div.error_title-background-TeXcolor=sphinx-error-title-bgcolor,
|
|
800
859
|
div.error_title-foreground-TeXcolor=sphinx-error-title-fgcolor,
|
|
801
860
|
%
|
|
802
|
-
%
|
|
803
|
-
%
|
|
861
|
+
% 8.1.0 add title rows, but will not use icons per default, so
|
|
862
|
+
% the fgcolor setting will be used only if user uses title-icon key
|
|
863
|
+
div.topic_title-background-TeXcolor=sphinx-admonition-title-bgcolor,
|
|
864
|
+
div.topic_title-foreground-TeXcolor=sphinx-admonition-title-fgcolor,
|
|
865
|
+
div.contents_title-background-TeXcolor=sphinx-admonition-title-bgcolor,
|
|
866
|
+
div.contents_title-foreground-TeXcolor=sphinx-admonition-title-fgcolor,
|
|
867
|
+
div.sidebar_title-background-TeXcolor=sphinx-note-title-bgcolor,
|
|
868
|
+
div.sidebar_title-foreground-TeXcolor=sphinx-note-title-fgcolor,
|
|
804
869
|
}
|
|
805
870
|
|
|
806
871
|
% 7.4.0 Support for icons in admonition titles
|
|
807
872
|
% We try to
|
|
808
873
|
% - get Sphinx PDF builds to process fine in absence of fontawesome5
|
|
809
874
|
% - use fontawesome5 if present, but not if user prefers another package
|
|
810
|
-
% - provide an interface for using other LaTeX code for icons
|
|
875
|
+
% - provide an interface for using other LaTeX code for icons
|
|
811
876
|
% - provide an interface for using some other package than fontawesome5
|
|
812
877
|
% Indeed we can't load fontawesome5 unconditionally even if available,
|
|
813
878
|
% as it proves incompatible with fontawesome package.
|
|
@@ -881,6 +946,9 @@
|
|
|
881
946
|
div.attention_title-icon = \spx@faIcon{exclamation-triangle},
|
|
882
947
|
div.danger_title-icon = \spx@faIcon{radiation},
|
|
883
948
|
div.error_title-icon = \spx@faIcon{times-circle},
|
|
949
|
+
% MEMO: the new at 8.1.0 defaults for contents/topic/sidebar directives
|
|
950
|
+
% use no icons, they use \sphinxdotitlerow which detects automatically
|
|
951
|
+
% whether title-icon key has been set or not.
|
|
884
952
|
}
|
|
885
953
|
|
|
886
954
|
\newif\ifspx@opt@box@addstrut
|
|
@@ -945,9 +1013,9 @@
|
|
|
945
1013
|
%% PASS OPTIONS
|
|
946
1014
|
%
|
|
947
1015
|
% pass options to hyperref; it must not have been loaded already
|
|
948
|
-
\
|
|
1016
|
+
\RequirePackage{sphinxoptionshyperref}
|
|
949
1017
|
% pass options to geometry; it must not have been loaded already
|
|
950
|
-
\
|
|
1018
|
+
\RequirePackage{sphinxoptionsgeometry}
|
|
951
1019
|
|
|
952
1020
|
|
|
953
1021
|
%% COLOR (general)
|
|
@@ -986,7 +1054,7 @@
|
|
|
986
1054
|
%
|
|
987
1055
|
% It will always be needed, so let's load it here
|
|
988
1056
|
\RequirePackage{graphicx}
|
|
989
|
-
\
|
|
1057
|
+
\RequirePackage{sphinxlatexgraphics}
|
|
990
1058
|
|
|
991
1059
|
|
|
992
1060
|
%% FRAMED ENVIRONMENTS
|
|
@@ -1051,14 +1119,14 @@
|
|
|
1051
1119
|
addstrut=false,
|
|
1052
1120
|
}%
|
|
1053
1121
|
\RequirePackage{sphinxpackageboxes}
|
|
1054
|
-
\
|
|
1055
|
-
\
|
|
1056
|
-
\
|
|
1122
|
+
\RequirePackage{sphinxlatexadmonitions}
|
|
1123
|
+
\RequirePackage{sphinxlatexliterals}
|
|
1124
|
+
\RequirePackage{sphinxlatexshadowbox}
|
|
1057
1125
|
|
|
1058
1126
|
|
|
1059
1127
|
%% CONTAINERS
|
|
1060
1128
|
%
|
|
1061
|
-
\
|
|
1129
|
+
\RequirePackage{sphinxlatexcontainers}
|
|
1062
1130
|
|
|
1063
1131
|
|
|
1064
1132
|
%% PYGMENTS
|
|
@@ -1068,17 +1136,17 @@
|
|
|
1068
1136
|
|
|
1069
1137
|
%% TABLES
|
|
1070
1138
|
%
|
|
1071
|
-
\
|
|
1139
|
+
\RequirePackage{sphinxlatextables}
|
|
1072
1140
|
|
|
1073
1141
|
|
|
1074
1142
|
%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
|
|
1075
1143
|
%
|
|
1076
|
-
\
|
|
1144
|
+
\RequirePackage{sphinxlatexnumfig}
|
|
1077
1145
|
|
|
1078
1146
|
|
|
1079
1147
|
%% LISTS
|
|
1080
1148
|
%
|
|
1081
|
-
\
|
|
1149
|
+
\RequirePackage{sphinxlatexlists}
|
|
1082
1150
|
|
|
1083
1151
|
|
|
1084
1152
|
%% FOOTNOTES
|
|
@@ -1108,19 +1176,19 @@
|
|
|
1108
1176
|
|
|
1109
1177
|
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
|
|
1110
1178
|
%
|
|
1111
|
-
\
|
|
1179
|
+
\RequirePackage{sphinxlatexindbibtoc}
|
|
1112
1180
|
|
|
1113
1181
|
|
|
1114
1182
|
%% STYLING
|
|
1115
1183
|
%
|
|
1116
|
-
\
|
|
1117
|
-
\
|
|
1118
|
-
\
|
|
1184
|
+
\RequirePackage{sphinxlatexstylepage}
|
|
1185
|
+
\RequirePackage{sphinxlatexstyleheadings}
|
|
1186
|
+
\RequirePackage{sphinxlatexstyletext}
|
|
1119
1187
|
|
|
1120
1188
|
|
|
1121
1189
|
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
|
|
1122
1190
|
%
|
|
1123
|
-
\
|
|
1191
|
+
\RequirePackage{sphinxlatexobjects}
|
|
1124
1192
|
|
|
1125
1193
|
|
|
1126
1194
|
% FIXME: this line should be dropped, as "9" is default anyhow.
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
%% NOTICES AND ADMONITIONS
|
|
2
2
|
%
|
|
3
3
|
% change this info string if making any custom modification
|
|
4
|
-
\
|
|
4
|
+
\ProvidesPackage{sphinxlatexadmonitions}[2024/07/28 v8.1.0 admonitions]
|
|
5
5
|
|
|
6
6
|
% Provides support for this output mark-up from Sphinx latex writer:
|
|
7
7
|
%
|
|
8
8
|
% - sphinxseealso environment added at 6.1.0.
|
|
9
9
|
%
|
|
10
|
-
% At 7.4.0 it too now uses sphinxheavybox, and has the same associated
|
|
11
|
-
% sphinxsetup CSS keys as admonitions do.
|
|
12
|
-
%
|
|
13
10
|
% - sphinxtodo environment added at 7.4.0.
|
|
14
11
|
%
|
|
15
12
|
% - sphinxadmonition (environment)
|
|
@@ -19,16 +16,21 @@
|
|
|
19
16
|
% sphinxheavybox since 6.2.0),
|
|
20
17
|
% - warning, caution, attention, danger, error to use sphinxheavybox.
|
|
21
18
|
%
|
|
22
|
-
%
|
|
19
|
+
% Since 7.4.0 all admonitions use sphinxheavybox.
|
|
23
20
|
%
|
|
24
21
|
% - All environments sphinxnote, sphinxwarning, etc... can be redefined as
|
|
25
22
|
% will by user. Thay have a single parameter #1 which is the title.
|
|
26
23
|
%
|
|
27
|
-
% -
|
|
28
|
-
%
|
|
29
|
-
%
|
|
30
|
-
%
|
|
31
|
-
%
|
|
24
|
+
% - Also redefinable by user are the one-argument commands
|
|
25
|
+
% * \sphinxstylenotetitle,
|
|
26
|
+
% * \sphinxstylewarningtitle,
|
|
27
|
+
% * etc.... one for each admonition type (also seealso and todo).
|
|
28
|
+
%
|
|
29
|
+
% - At 7.4.0, all commands of previous item use \sphinxdotitlerow.
|
|
30
|
+
% (the 7.4.0 name, still usable, was \sphinxdotitlerowwithicon; the 8.1.0
|
|
31
|
+
% version is also used for topic, contents and sidebar directives, see
|
|
32
|
+
% sphinxlatexshadowbox.sty, and handles both "with icon" and "without
|
|
33
|
+
% icon" situations).
|
|
32
34
|
%
|
|
33
35
|
% The sphinxlightbox environment is kept for backward compatiblity, for user
|
|
34
36
|
% custom code which used it via custom definitions done in preamble or via
|
|
@@ -42,20 +44,21 @@
|
|
|
42
44
|
% (the 7.4.0 redefined \sphinxstylenotetitle will not work in sphinxlightbox,
|
|
43
45
|
% so \sphinxstrong{#1}<space> which was its former default is used above).
|
|
44
46
|
|
|
45
|
-
%
|
|
46
|
-
% Requires:
|
|
47
|
-
\RequirePackage{sphinxpackageboxes}
|
|
48
|
-
% 7.4.0 removes unneeded \spx@boxes@border
|
|
49
|
-
\RequirePackage{framed}% used by sphinxheavybox
|
|
50
|
-
%
|
|
51
47
|
% Dependencies (they do not need to be defined at time of loading):
|
|
52
48
|
%
|
|
53
49
|
% - of course the various colour and dimension options handled via sphinx.sty
|
|
54
|
-
%
|
|
55
50
|
% - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty
|
|
51
|
+
% - \savenotes/\spewnotes from sphinxpackagefootnote.sty
|
|
52
|
+
% - \ifspx@inframed defined in sphinx.sty
|
|
53
|
+
% - \spx@boxes@fcolorbox@setup from sphinxpackageboxes.sty
|
|
54
|
+
%
|
|
55
|
+
\RequirePackage{framed}
|
|
56
|
+
% Those are required either before or after by sphinx.sty anyhow, but for
|
|
57
|
+
% clarity we list them here:
|
|
58
|
+
\RequirePackage{sphinxlatexgraphics}
|
|
59
|
+
\RequirePackage{sphinxpackagefootnote}
|
|
60
|
+
\RequirePackage{sphinxpackageboxes}
|
|
56
61
|
%
|
|
57
|
-
% - \savenotes/\spewnotes from sphinxpackagefootnote (for sphinxheavybox)
|
|
58
|
-
|
|
59
62
|
% Provides: (also in sphinxlatexliterals.sty)
|
|
60
63
|
% Only needed here by legacy (deprecated) sphinxlightbox environment.
|
|
61
64
|
\providecommand*\sphinxvspacefixafterfrenchlists{%
|
|
@@ -300,10 +303,15 @@
|
|
|
300
303
|
% workaround some LaTeX "feature" of \end command (i.e. can't use "sphinx#1" here)
|
|
301
304
|
{\edef\spx@temp{\noexpand\end{sphinx\spx@noticetype}}\spx@temp}
|
|
302
305
|
|
|
306
|
+
% TODO: allow these next three settings to be customized individually.
|
|
307
|
+
% This can however already be done at user level by \renewcommand
|
|
308
|
+
% inside renew'ed environments sphinxnote, sphinxhint etc...
|
|
303
309
|
\newcommand\sphinxtitlerowtoppadding{5pt}
|
|
304
310
|
\newcommand\sphinxtitlerowbottompadding{3pt}
|
|
305
311
|
\newcommand\sphinxtitlerowaftericonspacecmd{\hskip0.5em\relax}
|
|
306
|
-
|
|
312
|
+
% 7.4.0 used this longer name:
|
|
313
|
+
\newcommand\sphinxdotitlerowwithicon{\sphinxdotitlerow}
|
|
314
|
+
\newcommand\sphinxdotitlerow[2]{% #1=type, #2=heading (without final colon)
|
|
307
315
|
\begingroup
|
|
308
316
|
\kern-\spx@boxes@padding@top
|
|
309
317
|
\parskip\z@skip % the \parskip business is a workaround to a vertical
|
|
@@ -325,16 +333,24 @@
|
|
|
325
333
|
\spx@boxes@withshadowfalse
|
|
326
334
|
\sphinxcolorlet{spx@boxes@backgroundcolor}{sphinx#1TtlBgColor}%
|
|
327
335
|
\spx@boxes@fcolorbox{%
|
|
328
|
-
\
|
|
329
|
-
|
|
336
|
+
\parbox[t]{\linewidth}{% 7.4.0 used \makebox, but wrapping of long titles
|
|
337
|
+
% is needed for generic admonition or topic box.
|
|
338
|
+
\sphinxAtStartPar
|
|
339
|
+
% 8.1.0 auto-drops extra space if no icon
|
|
340
|
+
\sbox\z@{\@nameuse{sphinx#1TtlIcon}}%
|
|
341
|
+
\ifdim\wd\z@>\z@
|
|
342
|
+
\textcolor{sphinx#1TtlFgColor}{%
|
|
330
343
|
\@nameuse{sphinx#1TtlIcon}%
|
|
331
344
|
% This macro is located here and not after the closing brace
|
|
332
345
|
% for reasons of fall-back \spx@faIcon definition in sphinx.sty
|
|
333
346
|
% in case fontawesome5 package not found.
|
|
334
347
|
\sphinxtitlerowaftericonspacecmd
|
|
335
|
-
|
|
348
|
+
}%
|
|
349
|
+
\fi
|
|
336
350
|
\sphinxstrong{#2}%
|
|
337
|
-
\strut
|
|
351
|
+
\strut
|
|
352
|
+
\par
|
|
353
|
+
}%
|
|
338
354
|
}%
|
|
339
355
|
\kern-\spx@boxes@padding@right
|
|
340
356
|
\par
|
|
@@ -347,17 +363,17 @@
|
|
|
347
363
|
% \sphinxremovefinalcolon{#1} will typeset #1 without the colon.
|
|
348
364
|
% Legacy definitions (done in sphinxlatexstyletext.sty) were all using
|
|
349
365
|
% a boring plain \sphinxstrong{#1}, now we use a coloured title row.
|
|
350
|
-
\newcommand\sphinxstylenotetitle [1]{\
|
|
351
|
-
\newcommand\sphinxstylehinttitle [1]{\
|
|
352
|
-
\newcommand\sphinxstyleimportanttitle[1]{\
|
|
353
|
-
\newcommand\sphinxstyletiptitle [1]{\
|
|
354
|
-
\newcommand\sphinxstylewarningtitle [1]{\
|
|
355
|
-
\newcommand\sphinxstylecautiontitle [1]{\
|
|
356
|
-
\newcommand\sphinxstyleattentiontitle[1]{\
|
|
357
|
-
\newcommand\sphinxstyledangertitle [1]{\
|
|
358
|
-
\newcommand\sphinxstyleerrortitle [1]{\
|
|
359
|
-
\newcommand\sphinxstyleseealsotitle [1]{\
|
|
360
|
-
\newcommand\sphinxstyletodotitle [1]{\
|
|
366
|
+
\newcommand\sphinxstylenotetitle [1]{\sphinxdotitlerow{note}{\sphinxremovefinalcolon{#1}}}
|
|
367
|
+
\newcommand\sphinxstylehinttitle [1]{\sphinxdotitlerow{hint}{\sphinxremovefinalcolon{#1}}}
|
|
368
|
+
\newcommand\sphinxstyleimportanttitle[1]{\sphinxdotitlerow{important}{\sphinxremovefinalcolon{#1}}}
|
|
369
|
+
\newcommand\sphinxstyletiptitle [1]{\sphinxdotitlerow{tip}{\sphinxremovefinalcolon{#1}}}
|
|
370
|
+
\newcommand\sphinxstylewarningtitle [1]{\sphinxdotitlerow{warning}{\sphinxremovefinalcolon{#1}}}
|
|
371
|
+
\newcommand\sphinxstylecautiontitle [1]{\sphinxdotitlerow{caution}{\sphinxremovefinalcolon{#1}}}
|
|
372
|
+
\newcommand\sphinxstyleattentiontitle[1]{\sphinxdotitlerow{attention}{\sphinxremovefinalcolon{#1}}}
|
|
373
|
+
\newcommand\sphinxstyledangertitle [1]{\sphinxdotitlerow{danger}{\sphinxremovefinalcolon{#1}}}
|
|
374
|
+
\newcommand\sphinxstyleerrortitle [1]{\sphinxdotitlerow{error}{\sphinxremovefinalcolon{#1}}}
|
|
375
|
+
\newcommand\sphinxstyleseealsotitle [1]{\sphinxdotitlerow{seealso}{\sphinxremovefinalcolon{#1}}}
|
|
376
|
+
\newcommand\sphinxstyletodotitle [1]{\sphinxdotitlerow{todo}{\sphinxremovefinalcolon{#1}}}
|
|
361
377
|
%
|
|
362
378
|
% A utility to remove a final colon. Removing last token is not easy in
|
|
363
379
|
% LaTeX, and there are additional complications:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
%% CONTAINER DIRECTIVES
|
|
2
2
|
%
|
|
3
3
|
% change this info string if making any custom modification
|
|
4
|
-
\
|
|
4
|
+
\ProvidesPackage{sphinxlatexcontainers}[2021/05/03 containers]
|
|
5
5
|
|
|
6
6
|
% The purpose of this file is to provide a dummy environment sphinxclass which
|
|
7
7
|
% will be inserted for each class in each container directive. The class name
|