% \begin{macrocode} %<*sections> % \end{macrocode} % \subsection{Секции и параграфы} % \subsubsection{Section} % \begin{macrocode} \providecommand\tocprethesection{} \providecommand\tocpostthesection{.\@postskip} \providecommand\tocsectionfill{\tocfill{.}} \providecommand\tocsectionfont{\normalfont} \providecommand\tocsectionfillfont{} \providecommand\tocsectionnumfont{} % \end{macrocode} % Величина отступа записи в Содержании. % \DescribeMacro{\tocsectionindent} % \begin{macrocode} \providecommand\tocsectionindent{1.5em} % \end{macrocode} % Пробел после номера. % \DescribeMacro{\tocsectionnameindent} % \begin{macrocode} \providecommand\tocsectionnameindent{2.3em} \providecommand\sectionfont{\normalfont\large\bfseries} \providecommand\prethesection{} \providecommand\postthesection{.~} % \end{macrocode} % Величина отступа заголовка секции на странице. % \DescribeMacro{\sectionindent} % \begin{macrocode} \providecommand\sectionindent{\z@} % \end{macrocode} % Величина вертикального отступа перед заголовком секции. % \DescribeMacro{\presection} % \begin{macrocode} \providecommand\presection{-3.5ex \@plus -1ex \@minus -.2ex} % \end{macrocode} % Величина вертикального отступа после заголовка секции. % \DescribeMacro{\postsection} % \begin{macrocode} \providecommand\postsection{2.3ex \@plus.2ex} % \end{macrocode} % Выравнивание заголовка. % \DescribeMacro{\sectionalign} % \begin{macrocode} \providecommand\sectionalign{\raggedright} % \end{macrocode} % \subsubsection{Subsection} % \begin{macrocode} \providecommand\tocprethesubsection{} \providecommand\tocpostthesubsection{.\@postskip} \providecommand\tocsubsectionfill{\tocfill{.}} \providecommand\tocsubsectionfont{\normalfont} \providecommand\tocsubsectionfillfont{} \providecommand\tocsubsectionnumfont{} \providecommand\tocsubsectionindent{3.8em} \providecommand\tocsubsectionnameindent{3.2em} \providecommand\subsectionfont{\normalfont\normalsize\bfseries} \providecommand\prethesubsection{} \providecommand\postthesubsection{.~} \providecommand\subsectionindent{\z@} \providecommand\presubsection{-3.25ex\@plus -1ex \@minus -.2ex} \providecommand\postsubsection{1.5ex \@plus .2ex} \providecommand\subsectionalign{\raggedright} % \end{macrocode} % \subsubsection{Subsubsection} % \begin{macrocode} \providecommand\tocprethesubsubsection{} \providecommand\tocpostthesubsubsection{.\@postskip} \providecommand\tocsubsubsectionfill{\tocfill{.}} \providecommand\tocsubsubsectionfont{\normalfont} \providecommand\tocsubsubsectionfillfont{} \providecommand\tocsubsubsectionnumfont{} \providecommand\tocsubsubsectionindent{7.0em} \providecommand\tocsubsubsectionnameindent{4.1em} \providecommand\subsubsectionfont{\normalfont\normalsize\bfseries} \providecommand\prethesubsubsection{} \providecommand\postthesubsubsection{.~} \providecommand\subsubsectionindent{\z@} \providecommand\presubsubsection{-3.25ex\@plus -1ex \@minus -.2ex} \providecommand\postsubsubsection{1.5ex \@plus .2ex} \providecommand\subsubsectionalign{\raggedright} % \end{macrocode} % \subsubsection{Paragraph} % \begin{macrocode} \providecommand\tocpretheparagraph{} \providecommand\tocposttheparagraph{.\@postskip} \providecommand\tocparagraphfill{\tocfill{.}} \providecommand\tocparagraphfont{\normalfont} \providecommand\tocparagraphfillfont{} \providecommand\tocparagraphnumfont{} \providecommand\tocparagraphindent{10em} \providecommand\tocparagraphnameindent{5em} \providecommand\paragraphfont{\normalfont\normalsize\bfseries} \providecommand\pretheparagraph{} \providecommand\posttheparagraph{.~} \providecommand\paragraphindent{\z@} \providecommand\preparagraph{3.25ex \@plus1ex \@minus.2ex} \providecommand\postparagraph{-1em} \providecommand\paragraphalign{\raggedright} % \end{macrocode} % \subsubsection{Subparagraph} % \begin{macrocode} \providecommand\tocprethesubparagraph{} \providecommand\tocpostthesubparagraph{.\@postskip} \providecommand\tocsubparagraphfill{\tocfill{.}} \providecommand\tocsubparagraphfont{\normalfont} \providecommand\tocsubparagraphfillfont{} \providecommand\tocsubparagraphnumfont{} \providecommand\tocsubparagraphindent{12em} \providecommand\tocsubparagraphnameindent{6em} \providecommand\subparagraphfont{\normalfont\normalsize\bfseries} \providecommand\prethesubparagraph{} \providecommand\postthesubparagraph{.~} \providecommand\subparagraphindent{\parindent} \providecommand\presubparagraph{3.25ex \@plus1ex \@minus .2ex} \providecommand\postsubparagraph{-1em} \providecommand\subparagraphalign{\raggedright} % \end{macrocode} % \subsubsection{Заголовки секций} % % Обобщенная версия стандартного макроса, создающего заголовки секций. % \begin{macrocode} \def\@sect#1#2#3#4#5#6[#7]#8{% \ifnum #2>\c@secnumdepth \let\@svsec\@empty \else \refstepcounter{#1}% \protected@edef\@svsec{\@seccntformat{#1}\relax}% \fi \@tempskipa #5\relax \ifdim \@tempskipa>\z@ \begingroup #6{% \@hangfrom{\hskip #3\relax\@svsec}% \interlinepenalty \@M #8\@@par}% \endgroup \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else \protect\numberline{\@tocseccntformat{#1}}% \fi #7}% \else \def\@svsechd{% #6{\hskip #3\relax \@svsec #8}% \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else \protect\numberline{\@tocseccntformat{#1}}% \fi #7}}% \fi \@xsect{#5} } % \end{macrocode} % Обобщенная версия стандартного макроса, добавляющего запись в Содержание. % \begin{macrocode} \def\@tocline#1#2#3#4#5#6{% \ifnum #2>\c@tocdepth \else \vskip \z@ \@plus.2\p@ {\leftskip #3\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent #3\relax\@afterindenttrue \interlinepenalty\@M \leavevmode \@tempdima #4\relax \csname toc#1font\endcsname \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip {#5}\nobreak \csname toc#1fillfont\endcsname \csname toc#1fill\endcsname\hfill \nobreak\hb@xt@\@pnumwidth{\hfil\csname toc#1numfont\endcsname #6}% \par% }% \fi } \newcommand*\l@section {\@tocline{section} {1} {\tocsectionindent}{\tocsectionnameindent}} \newcommand*\l@subsection {\@tocline{subsection} {2} {\tocsubsectionindent}{\tocsubsectionnameindent}} \newcommand*\l@subsubsection{\@tocline{subsubsection}{3} {\tocsubsubsectionindent}{\tocsubsubsectionnameindent}} \newcommand*\l@paragraph {\@tocline{paragraph} {4} {\tocparagraphindent}{\tocparagraphnameindent}} \newcommand*\l@subparagraph {\@tocline{subparagraph} {5} {\tocsubparagraphindent}{\tocsubparagraphnameindent}} % \end{macrocode} % Интерфейс. % \begin{macrocode} \newcommand\section{% \@startsection{section}{1}{\sectionindent}% {\presection}{\postsection}{\sectionfont\sectionalign}} \newcommand\subsection{% \@startsection{subsection}{2}{\subsectionindent}% {\presubsection}{\postsubsection}{\subsectionfont\subsectionalign}} \newcommand\subsubsection{% \@startsection{subsubsection}{3}{\subsubsectionindent}% {\presubsubsection}{\postsubsubsection}{\subsubsectionfont\subsubsectionalign}} \newcommand\paragraph{% \@startsection{paragraph}{4}{\paragraphindent}% {\preparagraph}{\postparagraph}{\paragraphfont\paragraphalign}} \newcommand\subparagraph{% \@startsection{subparagraph}{5}{\parindent}% {\presubparagraph}{\postsubparagraph}{\subparagraphfont\subparagraphalign}} % \end{macrocode} % Команда для создания ненумеруемых секций, которые будут включены в Содержание. % \begin{macrocode} \newcommand\nsection[1]{% \section*{\phantomsection\addcontentsline{toc}{section}{#1}#1} } % % \end{macrocode}