summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/counters.dtx
blob: 259e0a2547efa55e11b3205a6773f37071d13d6e (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

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

%<*counters>
%    \end{macrocode}
%
% \subsection{Ñîçäàíèå è íàñòðîéêà ñ÷åò÷èêîâ}
%    \begin{macrocode}
\newcounter{part}
\newcounter{chapter}
\newcounter{section}[chapter]
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
\newcounter{figure}[chapter]
\newcounter{table}[chapter]
%    \end{macrocode}
%
% Ôîðìàò íóìåðàöèè ðàçäåëîâ äîêóìåíòà.
%    \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}

\newcommand\tocthepart{\thepart}
\newcommand\tocthechapter{\thechapter}
\newcommand\toctheappendix{\theappendix}
\newcommand\tocthesection{\thesection}
\newcommand\tocthesubsection{\thesubsection}
\newcommand\toctheparagraph{\theparagraph}
\newcommand\tocthesubparagraph{\thesubparagraph}

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

%    \end{macrocode}
% Ôîðìàò íîìåðà ôîðìóëû.
%    \begin{macrocode}
  \renewcommand\theequation{%
    \ifnum\c@chapter > \z@\thechapter.\fi%
    \@arabic\c@equation}
%    \end{macrocode}
% Ôîðìàò íîìåðà òàáëèöû.
%    \begin{macrocode}
  \renewcommand\thetable{%
    \ifnum \c@chapter>\z@\thechapter.\fi%
    \@arabic\c@table}
%    \end{macrocode}
% Ôîðìàò íîìåðà ðèñóíêà.
%    \begin{macrocode}
  \renewcommand\thefigure{%
    \ifnum \c@chapter>\z@\thechapter.\fi%
    \@arabic\c@figure}
}
%    \end{macrocode}
% Ïî óìîë÷àíèþ ó âñåõ îäèíàêîâàÿ ñõåìà íóìåðàöèè.
%    \begin{macrocode}
\newcommand\master@the   \bachelor@the
\newcommand\candidate@the\bachelor@the
\newcommand\doctor@the   \candidate@the
\newcommand\autoref@the  \candidate@the

\ifDis@bachelor \bachelor@the  \fi
\ifDis@master   \master@the    \fi
\ifDis@candidate\candidate@the \fi
\ifDis@doctor   \doctor@the    \fi
\ifDis@autoref  \autoref@the   \fi
%</counters>
%    \end{macrocode}