mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7822 from Jellby/fix_numfig
Fix #7715: Issue \@addtoreset after loading hyperref
This commit is contained in:
commit
6c71445e86
@ -881,52 +881,62 @@
|
|||||||
\g@addto@macro\spx@preBthefigure{\fi}}%
|
\g@addto@macro\spx@preBthefigure{\fi}}%
|
||||||
\fi
|
\fi
|
||||||
\ifnum\spx@opt@numfigreset>1
|
\ifnum\spx@opt@numfigreset>1
|
||||||
|
\AtBeginDocument{%
|
||||||
\@addtoreset{figure}{section}%
|
\@addtoreset{figure}{section}%
|
||||||
\@addtoreset{table}{section}%
|
\@addtoreset{table}{section}%
|
||||||
\@addtoreset{literalblock}{section}%
|
\@addtoreset{literalblock}{section}%
|
||||||
\ifspx@opt@mathnumfig
|
\ifspx@opt@mathnumfig
|
||||||
\@addtoreset{equation}{section}%
|
\@addtoreset{equation}{section}%
|
||||||
\fi
|
\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}%
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
\fi
|
\fi
|
||||||
\ifnum\spx@opt@numfigreset>2
|
\ifnum\spx@opt@numfigreset>2
|
||||||
|
\AtBeginDocument{%
|
||||||
\@addtoreset{figure}{subsection}%
|
\@addtoreset{figure}{subsection}%
|
||||||
\@addtoreset{table}{subsection}%
|
\@addtoreset{table}{subsection}%
|
||||||
\@addtoreset{literalblock}{subsection}%
|
\@addtoreset{literalblock}{subsection}%
|
||||||
\ifspx@opt@mathnumfig
|
\ifspx@opt@mathnumfig
|
||||||
\@addtoreset{equation}{subsection}%
|
\@addtoreset{equation}{subsection}%
|
||||||
\fi
|
\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}%
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
\fi
|
\fi
|
||||||
\ifnum\spx@opt@numfigreset>3
|
\ifnum\spx@opt@numfigreset>3
|
||||||
|
\AtBeginDocument{%
|
||||||
\@addtoreset{figure}{subsubsection}%
|
\@addtoreset{figure}{subsubsection}%
|
||||||
\@addtoreset{table}{subsubsection}%
|
\@addtoreset{table}{subsubsection}%
|
||||||
\@addtoreset{literalblock}{subsubsection}%
|
\@addtoreset{literalblock}{subsubsection}%
|
||||||
\ifspx@opt@mathnumfig
|
\ifspx@opt@mathnumfig
|
||||||
\@addtoreset{equation}{subsubsection}%
|
\@addtoreset{equation}{subsubsection}%
|
||||||
\fi
|
\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}%
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
\fi
|
\fi
|
||||||
\ifnum\spx@opt@numfigreset>4
|
\ifnum\spx@opt@numfigreset>4
|
||||||
|
\AtBeginDocument{%
|
||||||
\@addtoreset{figure}{paragraph}%
|
\@addtoreset{figure}{paragraph}%
|
||||||
\@addtoreset{table}{paragraph}%
|
\@addtoreset{table}{paragraph}%
|
||||||
\@addtoreset{literalblock}{paragraph}%
|
\@addtoreset{literalblock}{paragraph}%
|
||||||
\ifspx@opt@mathnumfig
|
\ifspx@opt@mathnumfig
|
||||||
\@addtoreset{equation}{paragraph}%
|
\@addtoreset{equation}{paragraph}%
|
||||||
\fi
|
\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}%
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
\fi
|
\fi
|
||||||
\ifnum\spx@opt@numfigreset>5
|
\ifnum\spx@opt@numfigreset>5
|
||||||
|
\AtBeginDocument{%
|
||||||
\@addtoreset{figure}{subparagraph}%
|
\@addtoreset{figure}{subparagraph}%
|
||||||
\@addtoreset{table}{subparagraph}%
|
\@addtoreset{table}{subparagraph}%
|
||||||
\@addtoreset{literalblock}{subparagraph}%
|
\@addtoreset{literalblock}{subparagraph}%
|
||||||
\ifspx@opt@mathnumfig
|
\ifspx@opt@mathnumfig
|
||||||
\@addtoreset{equation}{subparagraph}%
|
\@addtoreset{equation}{subparagraph}%
|
||||||
\fi
|
\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}%
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
\fi
|
\fi
|
||||||
|
Loading…
Reference in New Issue
Block a user