Skip to content

Commit

Permalink
LaTeX refactoring, use \RequirePackage always, not \input (sphinx-doc…
Browse files Browse the repository at this point in the history
…#12703)

Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
jfbu and AA-Turner authored Jul 31, 2024
1 parent 03d684f commit 97391b4
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 30 deletions.
30 changes: 15 additions & 15 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -945,9 +945,9 @@
%% PASS OPTIONS
%
% pass options to hyperref; it must not have been loaded already
\input{sphinxoptionshyperref.sty}
\RequirePackage{sphinxoptionshyperref}
% pass options to geometry; it must not have been loaded already
\input{sphinxoptionsgeometry.sty}
\RequirePackage{sphinxoptionsgeometry}


%% COLOR (general)
Expand Down Expand Up @@ -986,7 +986,7 @@
%
% It will always be needed, so let's load it here
\RequirePackage{graphicx}
\input{sphinxlatexgraphics.sty}
\RequirePackage{sphinxlatexgraphics}


%% FRAMED ENVIRONMENTS
Expand Down Expand Up @@ -1051,14 +1051,14 @@
addstrut=false,
}%
\RequirePackage{sphinxpackageboxes}
\input{sphinxlatexadmonitions.sty}
\input{sphinxlatexliterals.sty}
\input{sphinxlatexshadowbox.sty}
\RequirePackage{sphinxlatexadmonitions}
\RequirePackage{sphinxlatexliterals}
\RequirePackage{sphinxlatexshadowbox}


%% CONTAINERS
%
\input{sphinxlatexcontainers.sty}
\RequirePackage{sphinxlatexcontainers}


%% PYGMENTS
Expand All @@ -1068,17 +1068,17 @@

%% TABLES
%
\input{sphinxlatextables.sty}
\RequirePackage{sphinxlatextables}


%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
%
\input{sphinxlatexnumfig.sty}
\RequirePackage{sphinxlatexnumfig}


%% LISTS
%
\input{sphinxlatexlists.sty}
\RequirePackage{sphinxlatexlists}


%% FOOTNOTES
Expand Down Expand Up @@ -1108,19 +1108,19 @@

%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
%
\input{sphinxlatexindbibtoc.sty}
\RequirePackage{sphinxlatexindbibtoc}


%% STYLING
%
\input{sphinxlatexstylepage.sty}
\input{sphinxlatexstyleheadings.sty}
\input{sphinxlatexstyletext.sty}
\RequirePackage{sphinxlatexstylepage}
\RequirePackage{sphinxlatexstyleheadings}
\RequirePackage{sphinxlatexstyletext}


%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
%
\input{sphinxlatexobjects.sty}
\RequirePackage{sphinxlatexobjects}


% FIXME: this line should be dropped, as "9" is default anyhow.
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexadmonitions.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% NOTICES AND ADMONITIONS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexadmonitions.sty}[2024/07/01 v7.4.0 admonitions]
\ProvidesPackage{sphinxlatexadmonitions}[2024/07/01 v7.4.0 admonitions]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexcontainers.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% CONTAINER DIRECTIVES
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexcontainers.sty}[2021/05/03 containers]
\ProvidesPackage{sphinxlatexcontainers}[2021/05/03 containers]

% The purpose of this file is to provide a dummy environment sphinxclass which
% will be inserted for each class in each container directive. The class name
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexgraphics.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% GRAPHICS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexgraphics.sty}[2021/01/27 graphics]
\ProvidesPackage{sphinxlatexgraphics}[2021/01/27 graphics]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexindbibtoc.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexindbibtoc.sty}[2021/01/27 index, bib., toc]
\ProvidesPackage{sphinxlatexindbibtoc}[2021/01/27 index, bib., toc]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexlists.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% ALPHANUMERIC LIST ITEMS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexlists.sty}[2021/12/20 lists]
\ProvidesPackage{sphinxlatexlists}[2021/12/20 lists]

% Provides support for this output mark-up from Sphinx latex writer:
% - \sphinxsetlistlabels
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexliterals.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% LITERAL BLOCKS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexliterals.sty}[2024/07/01 v7.4.0 code-blocks and parsed literals]
\ProvidesPackage{sphinxlatexliterals}[2024/07/01 v7.4.0 code-blocks and parsed literals]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexnumfig.sty
Original file line number Diff line number Diff line change
@@ -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]
\ProvidesPackage{sphinxlatexnumfig}[2021/01/27 numbering]

% Requires: remreset (old LaTeX only)
% relates to numfig and numfig_secnum_depth configuration variables
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexobjects.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexobjects.sty}[2023/07/23 documentation environments]
\ProvidesPackage{sphinxlatexobjects}[2023/07/23 documentation environments]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexshadowbox.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% TOPIC AND CONTENTS BOXES
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexshadowbox.sty}[2023/03/19 sphinxShadowBox]
\ProvidesPackage{sphinxlatexshadowbox}[2023/03/19 sphinxShadowBox]

% Provides support for this output mark-up from Sphinx latex writer:
%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexstyleheadings.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% TITLES
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexstyleheadings.sty}[2023/02/11 headings]
\ProvidesPackage{sphinxlatexstyleheadings}[2023/02/11 headings]

\RequirePackage[nobottomtitles*]{titlesec}
\@ifpackagelater{titlesec}{2016/03/15}%
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexstylepage.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% PAGE STYLING
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexstylepage.sty}[2021/01/27 page styling]
\ProvidesPackage{sphinxlatexstylepage}[2021/01/27 page styling]

% Separate paragraphs by space by default.
\IfFileExists{parskip-2001-04-09.sty}% since September 2018 TeXLive update
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatexstyletext.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% TEXT STYLING
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatexstyletext.sty}[2024/07/01 v7.4.0 text styling]
\ProvidesPackage{sphinxlatexstyletext}[2024/07/01 v7.4.0 text styling]

% 7.4.0 has moved all that is related to admonitions to sphinxlatexadmonitions.sty
% Most everything left here consists of macros which are part of the latex markup
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxlatextables.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% TABLES (WITH SUPPORT FOR MERGED CELLS OF GENERAL CONTENTS)
%
% change this info string if making any custom modification
\ProvidesFile{sphinxlatextables.sty}[2024/07/01 v7.4.0 tables]%
\ProvidesPackage{sphinxlatextables}[2024/07/01 v7.4.0 tables]%

% Provides support for this output mark-up from Sphinx latex writer
% and table templates:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxoptionsgeometry.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% OPTIONS FOR GEOMETRY
%
% change this info string if making any custom modification
\ProvidesFile{sphinxoptionsgeometry.sty}[2021/01/27 geometry]
\ProvidesPackage{sphinxoptionsgeometry}[2021/01/27 geometry]

% geometry
\ifx\kanjiskip\@undefined
Expand Down
2 changes: 1 addition & 1 deletion sphinx/texinputs/sphinxoptionshyperref.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% Bookmarks and hyperlinks
%
% change this info string if making any custom modification
\ProvidesFile{sphinxoptionshyperref.sty}[2021/01/27 hyperref]
\ProvidesPackage{sphinxoptionshyperref}[2021/01/27 hyperref]

% to make pdf with correct encoded bookmarks in Japanese
% this should precede the hyperref package
Expand Down

0 comments on commit 97391b4

Please sign in to comment.