Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorJellby <jellby@yahoo.com>2020-06-12 12:05:16 +0300
committerJellby <jellby@yahoo.com>2020-06-12 15:04:24 +0300
commit137b7b31dc15cf78826b8911098233a0c9254196 (patch)
tree3e09a5cb23ec6a8aebb4596913631ebfd98d6b91 /sphinx
parent9df73e65b8b2fc7836bf4a4baf1851b30c138d7d (diff)
Issue \@addtoreset at begin document, after hyperref
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/texinputs/sphinx.sty20
1 files changed, 15 insertions, 5 deletions
diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty
index 63676d46d..a3e91ad34 100644
--- a/sphinx/texinputs/sphinx.sty
+++ b/sphinx/texinputs/sphinx.sty
@@ -881,52 +881,62 @@
\g@addto@macro\spx@preBthefigure{\fi}}%
\fi
\ifnum\spx@opt@numfigreset>1
+ \AtBeginDocument{%
\@addtoreset{figure}{section}%
\@addtoreset{table}{section}%
\@addtoreset{literalblock}{section}%
\ifspx@opt@mathnumfig
\@addtoreset{equation}{section}%
- \fi
+ \fi%
+ }%
\g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}.}%
\g@addto@macro\spx@preBthefigure{\fi}%
\fi
\ifnum\spx@opt@numfigreset>2
+ \AtBeginDocument{%
\@addtoreset{figure}{subsection}%
\@addtoreset{table}{subsection}%
\@addtoreset{literalblock}{subsection}%
\ifspx@opt@mathnumfig
\@addtoreset{equation}{subsection}%
- \fi
+ \fi%
+ }%
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}.}%
\g@addto@macro\spx@preBthefigure{\fi}%
\fi
\ifnum\spx@opt@numfigreset>3
+ \AtBeginDocument{%
\@addtoreset{figure}{subsubsection}%
\@addtoreset{table}{subsubsection}%
\@addtoreset{literalblock}{subsubsection}%
\ifspx@opt@mathnumfig
\@addtoreset{equation}{subsubsection}%
- \fi
+ \fi%
+ }%
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}.}%
\g@addto@macro\spx@preBthefigure{\fi}%
\fi
\ifnum\spx@opt@numfigreset>4
+ \AtBeginDocument{%
\@addtoreset{figure}{paragraph}%
\@addtoreset{table}{paragraph}%
\@addtoreset{literalblock}{paragraph}%
\ifspx@opt@mathnumfig
\@addtoreset{equation}{paragraph}%
- \fi
+ \fi%
+ }%
\g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}.}%
\g@addto@macro\spx@preBthefigure{\fi}%
\fi
\ifnum\spx@opt@numfigreset>5
+ \AtBeginDocument{%
\@addtoreset{figure}{subparagraph}%
\@addtoreset{table}{subparagraph}%
\@addtoreset{literalblock}{subparagraph}%
\ifspx@opt@mathnumfig
\@addtoreset{equation}{subparagraph}%
- \fi
+ \fi%
+ }%
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}.}%
\g@addto@macro\spx@preBthefigure{\fi}%
\fi