-
Notifications
You must be signed in to change notification settings - Fork 595
/
numbering.tex
94 lines (73 loc) · 2.59 KB
/
numbering.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
\newcommand{\sectionmajornumbering}
{
% \renewcommand*{\thesection}{\arabic{section}}
\counterwithin*{figure}{section}
\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}
\counterwithin*{table}{section}
\renewcommand{\thetable}{\arabic{section}.\arabic{table}}
\counterwithin*{lstlisting}{section}
\renewcommand{\thelstlisting}{\arabic{section}.\arabic{lstlisting}}
\counterwithin*{equation}{section}
\renewcommand{\theequation}{\arabic{section}-\arabic{equation}}
}
\newcommand{\chaptermajornumbering}
{
\counterwithin*{figure}{chapter}
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\counterwithin*{table}{chapter}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\counterwithin*{lstlisting}{chapter}
\renewcommand{\thelstlisting}{\arabic{chapter}.\arabic{lstlisting}}
\counterwithin*{equation}{chapter}
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
}
\newcommand{\appendixsubsecmajornumbering}
{
\ctexset{
subsection/number = \Alph{subsection},
subsubsection/number = \Alph{subsection}.\arabic{subsubsection}
}
% Fix hyperref link for subsections in appendix
\stepcounter{section}
\counterwithin*{figure}{subsection}
\renewcommand{\thefigure}{\Alph{subsection}.\arabic{figure}}
\counterwithin*{table}{subsection}
\renewcommand{\thetable}{\Alph{subsection}.\arabic{table}}
\counterwithin*{lstlisting}{subsection}
\renewcommand{\thelstlisting}{\Alph{subsection}.\arabic{lstlisting}}
\counterwithin*{equation}{subsection}
\renewcommand{\theequation}{\Alph{subsection}-\arabic{equation}}
}
\newcommand{\appendixsecmajornumbering}
{
\ctexset{
section/number = \Alph{section},
subsection/number = \Alph{section}.\arabic{subsection}
}
% Fix hyperref link for sections in appendix
\stepcounter{chapter}
\counterwithin*{figure}{section}
\renewcommand{\thefigure}{\Alph{section}.\arabic{figure}}
\counterwithin*{table}{section}
\renewcommand{\thetable}{\Alph{section}.\arabic{table}}
\counterwithin*{lstlisting}{section}
\renewcommand{\thelstlisting}{\Alph{section}.\arabic{lstlisting}}
\counterwithin*{equation}{section}
\renewcommand{\theequation}{\Alph{section}-\arabic{equation}}
}
\newcommand{\numberingstyle}
{
\ifthenelse{\equal{\Degree}{undergraduate}}
{
\ifthenelse{\equal{\undergradcurrstage}{proposal}}
{
\chaptermajornumbering
}
{
\sectionmajornumbering
}
}
{
\chaptermajornumbering
}
}