From 014b1af605f88ebcc54c38fd01299fd8f99011a1 Mon Sep 17 00:00:00 2001 From: Thomas Fanning Date: Mon, 22 Jul 2024 14:44:12 -0500 Subject: [PATCH 01/10] Add support for `math_numsep` in latex builder. --- sphinx/texinputs/sphinx.sty | 6 ++++-- sphinx/texinputs/sphinxlatexnumfig.sty | 20 ++++++++++---------- sphinx/writers/latex.py | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 633b244e180..8123f66f7c9 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -156,6 +156,7 @@ \DeclareStringOption[-1]{numfigreset} \DeclareBoolOption[false]{nonumfigreset} \DeclareBoolOption[false]{mathnumfig} +\DeclareStringOption[.]{mathnumsep} \define@key{sphinx}{bookmarksdepth}{\AtBeginDocument{\hypersetup{bookmarksdepth=#1}}} \AtBeginDocument{\define@key{sphinx}{bookmarksdepth}{\hypersetup{bookmarksdepth=#1}}} % \DeclareBoolOption[false]{usespart}% not used @@ -731,7 +732,7 @@ \spx@tempa{div.important_} {important} \spx@tempa{div.tip_} {tip} - % Add "legacy" hintTeXextras etc... + % Add "legacy" hintTeXextras etc... \def\spx@tempa#1#2{% #1 = CSS like option prefix, #2 = legacy option prefix \expandafter\let\csname KV@sphinx@#2TeXextras\expandafter\endcsname \csname KV@sphinx@#1TeXextras\endcsname @@ -807,7 +808,7 @@ % We try to % - get Sphinx PDF builds to process fine in absence of fontawesome5 % - use fontawesome5 if present, but not if user prefers another package -% - provide an interface for using other LaTeX code for icons +% - provide an interface for using other LaTeX code for icons % - provide an interface for using some other package than fontawesome5 % Indeed we can't load fontawesome5 unconditionally even if available, % as it proves incompatible with fontawesome package. @@ -898,6 +899,7 @@ \DisableKeyvalOption{sphinx}{numfigreset} \DisableKeyvalOption{sphinx}{nonumfigreset} \DisableKeyvalOption{sphinx}{mathnumfig} +\DisableKeyvalOption{sphinx}{mathnumsep} \DisableKeyvalOption{sphinx}{booktabs} \DisableKeyvalOption{sphinx}{borderless} \DisableKeyvalOption{sphinx}{rowcolors} diff --git a/sphinx/texinputs/sphinxlatexnumfig.sty b/sphinx/texinputs/sphinxlatexnumfig.sty index 6d72961051e..3f2da46ce1a 100644 --- a/sphinx/texinputs/sphinxlatexnumfig.sty +++ b/sphinx/texinputs/sphinxlatexnumfig.sty @@ -51,7 +51,7 @@ \ifnum\spx@opt@numfigreset>0 \ltx@ifundefined{c@chapter} {} - {\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}.}% + {\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}}% \g@addto@macro\spx@preBthefigure{\fi}}% \fi \ifnum\spx@opt@numfigreset>1 @@ -61,7 +61,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{section}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}.}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@.\arabic{section}}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>2 @@ -71,7 +71,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subsection}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}.}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@.\arabic{subsection}}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>3 @@ -81,7 +81,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subsubsection}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}.}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@.\arabic{subsubsection}}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>4 @@ -91,7 +91,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{paragraph}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}.}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@.\arabic{subparagraph}}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>5 @@ -101,7 +101,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subparagraph}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}.}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@.\arabic{subsubparagraph}}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \expandafter\g@addto@macro @@ -109,12 +109,12 @@ \let\thefigure\spx@preAthefigure \let\thetable\spx@preAthefigure \let\theliteralblock\spx@preAthefigure -\g@addto@macro\thefigure{\arabic{figure}}% -\g@addto@macro\thetable{\arabic{table}}% -\g@addto@macro\theliteralblock{\arabic{literalblock}}% +\g@addto@macro\thefigure{.\arabic{figure}}% +\g@addto@macro\thetable{.\arabic{table}}% +\g@addto@macro\theliteralblock{.\arabic{literalblock}}% \ifspx@opt@mathnumfig \let\theequation\spx@preAthefigure - \g@addto@macro\theequation{\arabic{equation}}% + \g@addto@macro\theequation{\spx@opt@mathnumsep\arabic{equation}}% \fi \fi }% end of big \AtBeginDocument diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 54f168e6a4d..9883c8b7163 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -356,6 +356,7 @@ def __init__(self, document: nodes.document, builder: LaTeXBuilder, if self.config.numfig and self.config.math_numfig: sphinxpkgoptions.append('mathnumfig') + sphinxpkgoptions.append('mathnumsep=%s' % self.config.math_numsep) if (self.config.language not in {'en', 'ja'} and 'fncychap' not in self.config.latex_elements): From b0a8a4ef7ad21342f8a5a6f12797b26f9ea28767 Mon Sep 17 00:00:00 2001 From: Thomas Fanning Date: Mon, 22 Jul 2024 15:08:33 -0500 Subject: [PATCH 02/10] Fix lint complaint --- sphinx/writers/latex.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 9883c8b7163..004c57ba963 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -355,8 +355,10 @@ def __init__(self, document: nodes.document, builder: LaTeXBuilder, sphinxpkgoptions.append('nonumfigreset') if self.config.numfig and self.config.math_numfig: - sphinxpkgoptions.append('mathnumfig') - sphinxpkgoptions.append('mathnumsep=%s' % self.config.math_numsep) + sphinxpkgoptions.extend([ + 'mathnumfig', + 'mathnumsep=%s' % self.config.math_numsep, + ]) if (self.config.language not in {'en', 'ja'} and 'fncychap' not in self.config.latex_elements): From a8483c087fa0b43a5321c00cad8994958d0df444 Mon Sep 17 00:00:00 2001 From: Thomas Fanning Date: Mon, 22 Jul 2024 15:17:48 -0500 Subject: [PATCH 03/10] Fix test cases. --- tests/test_builders/test_build_latex.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py index 1fde16b0d05..dc741a7e6f3 100644 --- a/tests/test_builders/test_build_latex.py +++ b/tests/test_builders/test_build_latex.py @@ -511,10 +511,10 @@ def test_latex_obey_numfig_secnum_depth_is_zero(app, status, warning): app.build(force_all=True) result = (app.outdir / 'SphinxManual.tex').read_text(encoding='utf8') - assert '\\usepackage[,nonumfigreset,mathnumfig]{sphinx}' in result + assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep=.]{sphinx}' in result result = (app.outdir / 'SphinxHowTo.tex').read_text(encoding='utf8') - assert '\\usepackage[,nonumfigreset,mathnumfig]{sphinx}' in result + assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep=.]{sphinx}' in result @pytest.mark.sphinx( @@ -524,10 +524,10 @@ def test_latex_obey_numfig_secnum_depth_is_two(app, status, warning): app.build(force_all=True) result = (app.outdir / 'SphinxManual.tex').read_text(encoding='utf8') - assert '\\usepackage[,numfigreset=2,mathnumfig]{sphinx}' in result + assert '\\usepackage[,numfigreset=2,mathnumfig,mathnumsep=.]{sphinx}' in result result = (app.outdir / 'SphinxHowTo.tex').read_text(encoding='utf8') - assert '\\usepackage[,numfigreset=3,mathnumfig]{sphinx}' in result + assert '\\usepackage[,numfigreset=3,mathnumfig,mathnumsep=.]{sphinx}' in result @pytest.mark.sphinx( From 2146ab08662067f2117e31b65286a4dc778beb26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:32:32 +0200 Subject: [PATCH 04/10] TeX wizardry to support `math_numsep` in LaTeX builder --- sphinx/texinputs/sphinxlatexnumfig.sty | 37 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/sphinx/texinputs/sphinxlatexnumfig.sty b/sphinx/texinputs/sphinxlatexnumfig.sty index 3f2da46ce1a..fd94b7f6277 100644 --- a/sphinx/texinputs/sphinxlatexnumfig.sty +++ b/sphinx/texinputs/sphinxlatexnumfig.sty @@ -1,7 +1,7 @@ %% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS % % change this info string if making any custom modification -\ProvidesFile{sphinxlatexnumfig.sty}[2021/01/27 numbering] +\ProvidesFile{sphinxlatexnumfig.sty}[v8.0 2024/07/23 numbering] % Requires: remreset (old LaTeX only) % relates to numfig and numfig_secnum_depth configuration variables @@ -37,7 +37,11 @@ \def\theequation{\arabic{equation}}% \fi \else -\let\spx@preAthefigure\@empty +% See apologetic comments on TeX wizardry at bottom fo file. +% The reason for this one is to catch case where there will be only +% the number with no prefix from enclosing sectioning (can happen +% with latex_toplevel_section='part'). +\def\spx@preAthefigure{\expandafter\spx@magicsep@s\romannumeral-`0} \let\spx@preBthefigure\@empty % \ifspx@opt@usespart % <-- LaTeX writer could pass such a 'usespart' boolean % % as sphinx.sty package option @@ -51,7 +55,7 @@ \ifnum\spx@opt@numfigreset>0 \ltx@ifundefined{c@chapter} {} - {\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}}% + {\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}}% \fi \ifnum\spx@opt@numfigreset>1 @@ -61,7 +65,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{section}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@.\arabic{section}}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>2 @@ -71,7 +75,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subsection}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@.\arabic{subsection}}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>3 @@ -81,7 +85,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subsubsection}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@.\arabic{subsubsection}}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>4 @@ -91,7 +95,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{paragraph}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@.\arabic{subparagraph}}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \ifnum\spx@opt@numfigreset>5 @@ -101,7 +105,7 @@ \ifspx@opt@mathnumfig \@addtoreset{equation}{subparagraph}% \fi% - \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@.\arabic{subsubparagraph}}% + \g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}\spx@magicsep}% \g@addto@macro\spx@preBthefigure{\fi}% \fi \expandafter\g@addto@macro @@ -109,14 +113,23 @@ \let\thefigure\spx@preAthefigure \let\thetable\spx@preAthefigure \let\theliteralblock\spx@preAthefigure -\g@addto@macro\thefigure{.\arabic{figure}}% -\g@addto@macro\thetable{.\arabic{table}}% -\g@addto@macro\theliteralblock{.\arabic{literalblock}}% +\g@addto@macro\thefigure{\arabic{figure}}% +\g@addto@macro\thetable{\arabic{table}}% +\g@addto@macro\theliteralblock{\arabic{literalblock}}% \ifspx@opt@mathnumfig \let\theequation\spx@preAthefigure - \g@addto@macro\theequation{\spx@opt@mathnumsep\arabic{equation}}% + \g@addto@macro\theequation{E}% \fi \fi }% end of big \AtBeginDocument +% Sorry for TeX wizardry here. We need to keep expandability. Explaining +% the mechanism is not really feasible to non-TeX experts, but the idea +% is to force next `\ifnum` conditional so we can check what comes next. +% All cases are accounted for (i.e. not an equation, or an equation at top +% level, or an equation in some section at some depth). +\def\spx@magicsep{\expandafter\spx@magicsep@i\romannumeral-`0} +\def\spx@magicsep@i#1{\if#1E\spx@opt@mathnumsep\arabic{equation}\else.#1\fi} +% +\def\spx@magicsep@s#1{\if#1E\arabic{equation}\else#1\fi} \endinput From 02dd3f755dfff0e7d5437e2001fc780bde3274c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:58:31 +0200 Subject: [PATCH 05/10] Guard against comma in numsep and update tests --- sphinx/writers/latex.py | 2 +- tests/test_builders/test_build_latex.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 004c57ba963..4a4a5519d72 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -357,7 +357,7 @@ def __init__(self, document: nodes.document, builder: LaTeXBuilder, if self.config.numfig and self.config.math_numfig: sphinxpkgoptions.extend([ 'mathnumfig', - 'mathnumsep=%s' % self.config.math_numsep, + 'mathnumsep={%s}' % self.config.math_numsep, ]) if (self.config.language not in {'en', 'ja'} and diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py index dc741a7e6f3..c96a80f4bb4 100644 --- a/tests/test_builders/test_build_latex.py +++ b/tests/test_builders/test_build_latex.py @@ -511,23 +511,23 @@ def test_latex_obey_numfig_secnum_depth_is_zero(app, status, warning): app.build(force_all=True) result = (app.outdir / 'SphinxManual.tex').read_text(encoding='utf8') - assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep=.]{sphinx}' in result + assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep={.}]{sphinx}' in result result = (app.outdir / 'SphinxHowTo.tex').read_text(encoding='utf8') - assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep=.]{sphinx}' in result + assert '\\usepackage[,nonumfigreset,mathnumfig,mathnumsep={.}]{sphinx}' in result @pytest.mark.sphinx( 'latex', testroot='latex-numfig', - confoverrides={'numfig': True, 'numfig_secnum_depth': 2}) + confoverrides={'numfig': True, 'numfig_secnum_depth': 2, 'math_numsep': "-"}) def test_latex_obey_numfig_secnum_depth_is_two(app, status, warning): app.build(force_all=True) result = (app.outdir / 'SphinxManual.tex').read_text(encoding='utf8') - assert '\\usepackage[,numfigreset=2,mathnumfig,mathnumsep=.]{sphinx}' in result + assert '\\usepackage[,numfigreset=2,mathnumfig,mathnumsep={-}]{sphinx}' in result result = (app.outdir / 'SphinxHowTo.tex').read_text(encoding='utf8') - assert '\\usepackage[,numfigreset=3,mathnumfig,mathnumsep=.]{sphinx}' in result + assert '\\usepackage[,numfigreset=3,mathnumfig,mathnumsep={-}]{sphinx}' in result @pytest.mark.sphinx( From 0b8c6489f31dce7ae2d105a5178ebbe40bc2f45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:23:46 +0200 Subject: [PATCH 06/10] Fix typos in code comments --- sphinx/texinputs/sphinxlatexnumfig.sty | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx/texinputs/sphinxlatexnumfig.sty b/sphinx/texinputs/sphinxlatexnumfig.sty index fd94b7f6277..f3e87ad4ce3 100644 --- a/sphinx/texinputs/sphinxlatexnumfig.sty +++ b/sphinx/texinputs/sphinxlatexnumfig.sty @@ -37,10 +37,10 @@ \def\theequation{\arabic{equation}}% \fi \else -% See apologetic comments on TeX wizardry at bottom fo file. +% See apologetic comments on TeX wizardry at bottom of file. % The reason for this one is to catch case where there will be only % the number with no prefix from enclosing sectioning (can happen -% with latex_toplevel_section='part'). +% with latex_toplevel_sectioning='part'). \def\spx@preAthefigure{\expandafter\spx@magicsep@s\romannumeral-`0} \let\spx@preBthefigure\@empty % \ifspx@opt@usespart % <-- LaTeX writer could pass such a 'usespart' boolean @@ -124,7 +124,7 @@ }% end of big \AtBeginDocument % Sorry for TeX wizardry here. We need to keep expandability. Explaining -% the mechanism is not really feasible to non-TeX experts, but the idea +% the mechanism is not really feasible to non TeX-experts, but the idea % is to force next `\ifnum` conditional so we can check what comes next. % All cases are accounted for (i.e. not an equation, or an equation at top % level, or an equation in some section at some depth). From d414bf5c196f622f9987c81e2fb74422bef6fa43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B=2E?= <2589111+jfbu@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:37:46 +0200 Subject: [PATCH 07/10] Allow usage of LaTeX mathnumsep throughout --- sphinx/texinputs/sphinx.sty | 1 - 1 file changed, 1 deletion(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index b04cd6f9eeb..5c5f2f7a606 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -899,7 +899,6 @@ \DisableKeyvalOption{sphinx}{numfigreset} \DisableKeyvalOption{sphinx}{nonumfigreset} \DisableKeyvalOption{sphinx}{mathnumfig} -\DisableKeyvalOption{sphinx}{mathnumsep} \DisableKeyvalOption{sphinx}{booktabs} \DisableKeyvalOption{sphinx}{borderless} \DisableKeyvalOption{sphinx}{rowcolors} From 80d173e997ae8b402f6332086bed0a7b83eb6960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:44:19 +0200 Subject: [PATCH 08/10] Update CHANGES.rst --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 1d04bc27010..85657752717 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,9 @@ Deprecated Features added -------------- +* #12652: LaTeX: Add :confval:`math_numsep` support to latex builder. + Patch by Thomas Fanning and Jean-François B. + Bugs fixed ---------- From 7875ec862d3c6d3f8cccc946841cf0ca69c62f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Wed, 31 Jul 2024 20:05:40 +0200 Subject: [PATCH 09/10] Update LaTeX docs for mathnumsep vs math_numsep --- doc/latex.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/latex.rst b/doc/latex.rst index 821c8329764..9af51b41eab 100644 --- a/doc/latex.rst +++ b/doc/latex.rst @@ -690,6 +690,13 @@ The color used in the above example is available from having passed the .. versionadded:: 1.5.3 +``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 + ``verbatimwithframe`` Boolean to specify if :rst:dir:`code-block`\ s and literal includes are framed. Setting it to ``false`` does not deactivate use of package From b21e51dcc8ac4de4b08598c67e45770872815a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= <2589111+jfbu@users.noreply.github.com> Date: Sun, 18 Aug 2024 21:26:08 +0200 Subject: [PATCH 10/10] Apply Ruff formatting --- tests/test_builders/test_build_latex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py index 1cdc9b09b80..1d474f67691 100644 --- a/tests/test_builders/test_build_latex.py +++ b/tests/test_builders/test_build_latex.py @@ -668,7 +668,7 @@ def test_latex_obey_numfig_secnum_depth_is_zero(app): @pytest.mark.sphinx( 'latex', testroot='latex-numfig', - confoverrides={'numfig': True, 'numfig_secnum_depth': 2, 'math_numsep': "-"}, + confoverrides={'numfig': True, 'numfig_secnum_depth': 2, 'math_numsep': '-'}, ) def test_latex_obey_numfig_secnum_depth_is_two(app): app.build(force_all=True)