summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/counters.dtx
blob: f976030e538ada8a4549e8b53e262bedbf4ab6d0 (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

% \iffalse
%%% From File: counters.dtx
% \fi
%
%    \begin{macrocode}

%<*counters>
%    \end{macrocode}
%
% \subsection{Ñîçäàíèå è íàñòðîéêà ñ÷åò÷èêîâ}
%
% Ìàêñèìàëüíûé óðîâåíü âëîæåííîñòè ñåêöèé, ïîìåùàåìûõ â îãëàâëåíèå
% (ïî óìîë÷àíèþ âíîñÿòñÿ |\part|, |\chapter| è |\section|).
% \DescribeMacro{tocdepth}\index{Ñ÷åò÷èêè!\verb*+tocdepth+}
%    \begin{macrocode}
\setcounter{tocdepth}{1}
%    \end{macrocode}
% Ìàêñèìàëüíûé óðîâåíü âëîæåííîñòè íóìåðóåìûõ ñåêöèé
% (ïî óìîë÷àíèþ íóìåðóþòñÿ |\part|, |\chapter|, |\section| è |\subsection|).
% \DescribeMacro{secnumdepth}\index{Ñ÷åò÷èêè!\verb*+secnumdepth+}
%    \begin{macrocode}
\setcounter{secnumdepth}{2}

%    \end{macrocode}
%
% \DescribeMacro{part}\index{Ñ÷åò÷èêè!\verb*+part+}
% \DescribeMacro{chapter}\index{Ñ÷åò÷èêè!\verb*+chapter+}
% \DescribeMacro{section}\index{Ñ÷åò÷èêè!\verb*+section+}
% \DescribeMacro{subsection}\index{Ñ÷åò÷èêè!\verb*+subsection+}
% \DescribeMacro{subsubsection}\index{Ñ÷åò÷èêè!\verb*+subsubsection+}
% \DescribeMacro{paragraph}\index{Ñ÷åò÷èêè!\verb*+paragraph+}
% \DescribeMacro{subparagraph}\index{Ñ÷åò÷èêè!\verb*+subparagraph+}
%    \begin{macrocode}
\newcounter{part}
\newcounter{chapter}
\newcounter{section}[chapter]
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]

%    \end{macrocode}
%
% \DescribeMacro{figure}\index{Ñ÷åò÷èêè!\verb*+figure+}
% \DescribeMacro{table}\index{Ñ÷åò÷èêè!\verb*+table+}
%    \begin{macrocode}
\newcounter{figure}[chapter]
\newcounter{table}[chapter]

%    \end{macrocode}
%
% Ôîðìàò íóìåðàöèè ðàçäåëîâ äîêóìåíòà â òåêñòå.
% \DescribeMacro{\thepart}\index{Ìàêðîñû!\verb*+\thepart+}
% \DescribeMacro{\thechapter}\index{Ìàêðîñû!\verb*+\thechapter+}
% \DescribeMacro{\theappendix}\index{Ìàêðîñû!\verb*+\theappendix+}
% \DescribeMacro{\thesection}\index{Ìàêðîñû!\verb*+\thesection+}
% \DescribeMacro{\thesubsection}\index{Ìàêðîñû!\verb*+\thesubsection+}
% \DescribeMacro{\thesubsubsection}\index{Ìàêðîñû!\verb*+\thesubsubsection+}
% \DescribeMacro{\theparagraph}\index{Ìàêðîñû!\verb*+\theparagraph+}
% \DescribeMacro{\thesubparagraph}\index{Ìàêðîñû!\verb*+\thesubparagraph+}
%    \begin{macrocode}
\renewcommand\thepart{\@Roman\c@part}
\renewcommand\thechapter{\@arabic\c@chapter}
\newcommand\theappendix{\@Asbuk\c@chapter}
\renewcommand\thesection{%
\ifnum\c@chapter > \z@
  \thechapter.\@arabic\c@section%
\else\@arabic\c@section\fi}
\renewcommand\thesubsection{\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph{\@arabic\c@paragraph}
\renewcommand\thesubparagraph{\theparagraph.\@arabic\c@subparagraph}

%    \end{macrocode}
% Ôîðìàò íóìåðàöèè ðàçäåëîâ äîêóìåíòà â îãëàâëåíèè.
% \DescribeMacro{\tocthepart}\index{Ìàêðîñû!\verb*+\tocthepart+}
% \DescribeMacro{\tocthechapter}\index{Ìàêðîñû!\verb*+\tocthechapter+}
% \DescribeMacro{\toctheappendix}\index{Ìàêðîñû!\verb*+\toctheappendix+}
% \DescribeMacro{\tocthesection}\index{Ìàêðîñû!\verb*+\tocthesection+}
% \DescribeMacro{\tocthesubsection}\index{Ìàêðîñû!\verb*+\tocthesubsection+}
% \DescribeMacro{\tocthesubsubsection}\index{Ìàêðîñû!\verb*+\tocthesubsubsection+}
% \DescribeMacro{\toctheparagraph}\index{Ìàêðîñû!\verb*+\toctheparagraph+}
% \DescribeMacro{\tocthesubparagraph}\index{Ìàêðîñû!\verb*+\tocthesubparagraph+}
%    \begin{macrocode}
\newcommand\tocthepart{\thepart}
\newcommand\tocthechapter{\thechapter}
\newcommand\toctheappendix{\theappendix}
\newcommand\tocthesection{\thesection}
\newcommand\tocthesubsection{\thesubsection}
\newcommand\tocthesubsubsection{\thesubsubsection}
\newcommand\toctheparagraph{\theparagraph}
\newcommand\tocthesubparagraph{\thesubparagraph}

%    \end{macrocode}
%
% Ñõåìà íóìåðàöèè îáúåêòîâ ïî óìîë÷àíèþ.
% \DescribeMacro{\default@the}\index{Ìàêðîñû!\verb*+\default"@the+}
%    \begin{macrocode}
\newcommand\default@the{%
%    \end{macrocode}
% Íóìåðàöèÿ ñíîñîê è ôîðìóë íà÷èíàåòñÿ çàíîâî â êàæäîé ãëàâå.
%    \begin{macrocode}
  \@addtoreset{footnote}{chapter}
  \@addtoreset{equation}{chapter}

%    \end{macrocode}
% Ôîðìàò íîìåðà ôîðìóëû.
% \DescribeMacro{\theequation}\index{Ìàêðîñû!\verb*+\theequation+}
%    \begin{macrocode}
  \renewcommand\theequation{%
    \ifnum\c@chapter > \z@\thechapter.\fi%
    \@arabic\c@equation}
%    \end{macrocode}
% Ôîðìàò íîìåðà òàáëèöû.
% \DescribeMacro{\thetable}\index{Ìàêðîñû!\verb*+\thetable+}
%    \begin{macrocode}
  \renewcommand\thetable{%
    \ifnum \c@chapter>\z@\thechapter.\fi%
    \@arabic\c@table}
%    \end{macrocode}
% Ôîðìàò íîìåðà ðèñóíêà.
% \DescribeMacro{\thefigure}\index{Ìàêðîñû!\verb*+\thefigure+}
%    \begin{macrocode}
  \renewcommand\thefigure{%
    \ifnum \c@chapter>\z@\thechapter.\fi%
    \@arabic\c@figure}
}
%</counters>
%    \end{macrocode}