summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/disser/part.dtx
blob: da96ab700552bbe493ed59e0a1c194fa5b1e0e5c (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
131
132
133
134
135
136
137
138
139
140
141
%    \begin{macrocode}

%<*part>
%    \end{macrocode}
% \subsection{×àñòü}
%
% \subsubsection{Ôîðìàò çàïèñè â Ñîäåðæàíèè}
% Ïîñòîÿííûé òåêñò äî íîìåðà (ïî óìîë÷àíèþ --- ñëîâî ``×àñòü'').
%    \begin{macrocode}
\providecommand\tocprethepart{\partname~}
%    \end{macrocode}
% Ïîñòîÿííûé òåêñò ïîñëå íîìåðà.
%    \begin{macrocode}
\providecommand\tocpostthepart{.\@postskip}
%    \end{macrocode}
% Çàïîëíèòåëü ìåæäó íàçâàíèåì è íîìåðîì ñòðàíèöû. Äëÿ ÷àñòè ïî óìîë÷àíèþ îòñóòñòâóåò.
% ×òîáû çàïîëíèòü êàêèìè-ëèáî ñèìâîëàìè |\tocpartfill| íóæíî ïðèñâîèòü çíà÷åíèå
% |\tocfill{ñèìâîë}|. Äëÿ ïðèìåðà ñì. äàëåå îïðåäåëåíèå |\tocsectionfill|.
%    \begin{macrocode}
\providecommand\tocpartfill{}
%    \end{macrocode}
% Øðèôò çàãîëîâêà â Ñîäåðæàíèè.
%    \begin{macrocode}
\providecommand\tocpartfont{\bfseries}
%    \end{macrocode}
% Øðèôò çàïîëíèòåëÿ.
%    \begin{macrocode}
\providecommand\tocpartfillfont{\normalfont}
%    \end{macrocode}
% Øðèôò íîìåðà.
%    \begin{macrocode}
\providecommand\tocpartnumfont{\normalfont}

%    \end{macrocode}
% Ïàðàìåòðû íîìåðà è íàçâàíèÿ: âûðàâíèâàíèå, øðèôò, îòñòóïû, òåêñò äî è ïîñëå.
%    \begin{macrocode}
\providecommand\thepartalign{\centering}
\providecommand\thepartfont{\huge}
\providecommand\prethepart{\tocprethepart}
\providecommand\postthepart{\par\vskip 20\p@}

\providecommand\partalign{\centering}
\providecommand\partfont{\huge\bfseries}
\providecommand\prepart{}
\providecommand\postpart{\par}

%    \end{macrocode}
% Ñòèëü ñòðàíèöû, íà êîòîðîé ðàñïîëîæåí çàãîëîâîê ÷àñòè.
%    \begin{macrocode}
\def\partpagestyle#1{\gdef\@partpagestyle{#1}}\partpagestyle{empty}
%    \end{macrocode}
%
% Èíòåðôåéñ.
%    \begin{macrocode}
\newcommand\part{
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \thispagestyle{\@partpagestyle}%
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \null\vfil\secdef\@part\@spart
}
%    \end{macrocode}
% Óñòàíîâêà ñ÷åò÷èêîâ è äîáàâëåíèå ñòðîêè â Ñîäåðæàíèå.
%    \begin{macrocode}
\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >-2\relax
    \refstepcounter{part}%
%    \end{macrocode}
% Çäåñü è äàëåå êîìàíäà |\def\\{ }| èñïîëüçóåòñÿ äëÿ êîððåêòíîãî îòîáðàæåíèÿ
% çàãîëîâêîâ ñ ïðèíóäèòåëüíûìè ðàçðûâàìè ñòðîê.
%    \begin{macrocode}
    {\def\\{ }\addcontentsline{toc}{part}{\@tocseccntformat{part} #1}}
  \else
    {\def\\{ }\addcontentsline{toc}{part}{#1}}
  \fi
  \markboth{}{}%
  {%
    \interlinepenalty \@M
    \normalfont
    \ifnum \c@secnumdepth >-2\relax
%    \end{macrocode}
%
% Ïîñòîÿííàÿ ÷àñòü çàãîëîâêà è íîìåð.
%    \begin{macrocode}
      {\thepartfont\partalign\@seccntformat{part}}
    \fi%
%    \end{macrocode}
% Íàçâàíèå.
%    \begin{macrocode}
    {\partfont\partalign\prepart #2\postpart}%
  }
  \@endpart%
}

\def\@spart#1{%
  \partalign{\interlinepenalty \@M%
    \partfont\prepart #1\postpart}%
  \@endpart
}

\def\@endpart{
  \vfil\newpage
  \if@twoside
    \null
    \thispagestyle{\partpagestyle}%
    \newpage
  \fi
  \if@tempswa\twocolumn\fi
}
%    \end{macrocode}
% Êîìàíäà, ñîçäàþùàÿ çàïèñü â Ñîäåðæàíèè.
%    \begin{macrocode}
\newcommand*\l@part[2]
{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{-\@highpenalty}%
    \addvspace{2.25em \@plus\p@}%
    \begingroup
      \setlength\@tempdima{3em}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      {\leavevmode \tocpartfont #1\nobreak
      \tocpartfillfont\tocpartfill\hfill
      \hb@xt@\@pnumwidth{\hss\tocpartnumfont #2}}
      \par\nobreak
      \global\@nobreaktrue
      \everypar{\global\@nobreakfalse\everypar{}}%
    \endgroup
  \fi
}

%</part>
%    \end{macrocode}