summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/disser/src/counters.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/disser/src/counters.dtx
Initial commit
Diffstat (limited to 'macros/latex/contrib/disser/src/counters.dtx')
-rw-r--r--macros/latex/contrib/disser/src/counters.dtx131
1 files changed, 131 insertions, 0 deletions
diff --git a/macros/latex/contrib/disser/src/counters.dtx b/macros/latex/contrib/disser/src/counters.dtx
new file mode 100644
index 0000000000..b1deb46a13
--- /dev/null
+++ b/macros/latex/contrib/disser/src/counters.dtx
@@ -0,0 +1,131 @@
+
+% \iffalse
+%%% From File: counters.dtx
+% \fi
+%
+% \begin{macrocode}
+
+%<*counters>
+% \end{macrocode}
+%
+% \subsection{Создание и настройка счетчиков}
+%
+% Максимальный уровень вложенности секций, помещаемых в оглавление
+% (по умолчанию вносятся |\part|, |\chapter| и |\section|).
+% \DescribeCounter{tocdepth}
+% \begin{macrocode}
+\setcounter{tocdepth}{1}
+% \end{macrocode}
+% Максимальный уровень вложенности нумеруемых секций
+% (по умолчанию нумеруются |\part|, |\chapter|, |\section| и |\subsection|).
+% \DescribeCounter{secnumdepth}
+% \begin{macrocode}
+\setcounter{secnumdepth}{2}
+
+% \end{macrocode}
+%
+% \DescribeCounter{part}
+% \DescribeCounter{chapter}
+% \DescribeCounter{section}
+% \DescribeCounter{subsection}
+% \DescribeCounter{subsubsection}
+% \DescribeCounter{paragraph}
+% \DescribeCounter{subparagraph}
+% \begin{macrocode}
+\newcounter{part}
+\newcounter{chapter}
+\newcounter{section}[chapter]
+\newcounter{subsection}[section]
+\newcounter{subsubsection}[subsection]
+\newcounter{paragraph}[subsubsection]
+\newcounter{subparagraph}[paragraph]
+
+% \end{macrocode}
+%
+% \DescribeCounter{figure}
+% \DescribeCounter{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{part}}
+\renewcommand\thechapter{\arabic{chapter}}
+\newcommand\theappendix{\Asbuk{chapter}}
+\renewcommand\thesection{%
+\ifnum\c@chapter > \z@
+ \thechapter.\arabic{section}%
+\else\arabic{section}\fi}
+\renewcommand\thesubsection{\thesection.\arabic{subsection}}
+\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
+\renewcommand\theparagraph{\arabic{paragraph}}
+\renewcommand\thesubparagraph{\theparagraph.\arabic{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}
+\providecommand\tocthepart{\thepart}
+\providecommand\tocthechapter{\thechapter}
+\providecommand\toctheappendix{\theappendix}
+\providecommand\tocthesection{\thesection}
+\providecommand\tocthesubsection{\thesubsection}
+\providecommand\tocthesubsubsection{\thesubsubsection}
+\providecommand\toctheparagraph{\theparagraph}
+\providecommand\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}