Skip to content

Commit

Permalink
Fix 图片在同一section下会重新标号 #298
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNetAdmin committed Apr 14, 2023
1 parent 59b7845 commit e4cdcb4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions body/graduate/post/appendix.tex
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
\end{figure}

\section{另一个附录}

% End of appendix
\removeappendixsecmajornumbering
}
3 changes: 3 additions & 0 deletions body/undergraduate/final/3-appendix.tex
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
\begin{equation}
x^n + y^n = z^n
\end{equation}

% End of appendix
\removeappendixsubsecmajornumbering
}
18 changes: 18 additions & 0 deletions config/format/general/numbering.tex
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
\renewcommand{\thealgorithm}{\Alph{subsection}.\arabic{algorithm}}
}

\newcommand{\removeappendixsubsecmajornumbering}
{
\counterwithout*{figure}{subsection}
\counterwithout*{table}{subsection}
\counterwithout*{lstlisting}{subsection}
\counterwithout*{equation}{subsection}
\counterwithout*{algorithm}{subsection}
}

\newcommand{\appendixsecmajornumbering}
{
\ctexset{
Expand All @@ -88,6 +97,15 @@
\renewcommand{\thealgorithm}{\Alph{section}.\arabic{algorithm}}
}

\newcommand{\removeappendixsecmajornumbering}
{
\counterwithout*{figure}{section}
\counterwithout*{table}{section}
\counterwithout*{lstlisting}{section}
\counterwithout*{equation}{section}
\counterwithout*{algorithm}{section}
}

\newcommand{\numberingstyle}
{
\ifthenelse{\equal{\Degree}{undergraduate}}
Expand Down

0 comments on commit e4cdcb4

Please sign in to comment.