Skip to content

Commit 0df46e0

Browse files
akiyksJonathan Corbet
authored andcommitted
docs: kerneldoc-preamble.sty: Remove code for Sphinx <2.4
Now that Sphinx 2.4.4 or better is required, get rid of \providecommand{}'s for compatibility with Sphinx 1.7.9. While at it, reword the comment on \sphinxtableofcontentshook for better description of why it needs to be emptied. Signed-off-by: Akira Yokosawa <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Message-ID: <[email protected]>
1 parent fe25625 commit 0df46e0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Documentation/sphinx/kerneldoc-preamble.sty

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@
5454
\renewcommand*\l@section{\@dottedtocline{1}{2.4em}{3.2em}}
5555
\renewcommand*\l@subsection{\@dottedtocline{2}{5.6em}{4.3em}}
5656
\makeatother
57-
%% Sphinx < 1.8 doesn't have \sphinxtableofcontentshook
58-
\providecommand{\sphinxtableofcontentshook}{}
59-
%% Undefine it for compatibility with Sphinx 1.7.9
57+
%% Prevent default \sphinxtableofcontentshook from overwriting above tweaks.
6058
\renewcommand{\sphinxtableofcontentshook}{} % Empty the hook
6159

6260
% Prevent column squeezing of tabulary. \tymin is set by Sphinx as:
@@ -136,9 +134,6 @@
136134
}
137135
\newCJKfontfamily[JPsans]\jpsans{Noto Sans CJK JP}[AutoFakeSlant]
138136
\newCJKfontfamily[JPmono]\jpmono{Noto Sans Mono CJK JP}[AutoFakeSlant]
139-
% Dummy commands for Sphinx < 2.3 (no 'extrapackages' support)
140-
\providecommand{\onehalfspacing}{}
141-
\providecommand{\singlespacing}{}
142137
% Define custom macros to on/off CJK
143138
%% One and half spacing for CJK contents
144139
\newcommand{\kerneldocCJKon}{\makexeCJKactive\onehalfspacing}

0 commit comments

Comments
 (0)