summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/rus/ruspaper.sty
blob: 9d0d59540944b2e15582dac0d32d81b1ae4fc784 (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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320

%  *****************************************
%  *            RUSpaper OPTION            *
%  *****************************************
%  *          USUS DOCUMENT STYLE          *
%  *****************************************
%

\typeout{USUS - Document Style Option 'RUSpaper'. Released 3 May 1988}
\makeatletter % make @ a letter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This was made from:
%
% ARTICLE DOCUMENT STYLE -- released 17 December 1985
%    for LaTeX version 2.09
% Copyright (C) 1985 by Leslie Lamport
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%    ****************************************
%    *         OTHER ENVIRONMENTS           *
%    ****************************************
%
% EQUATION and EQNARRAY
%
% \newcounter{equation}
%  Default is for left-hand side of equations to be flushleft.
%  To make them flushright, do:
%  \let\@eqnsel = \hfil
%
\def\theequation{\arabic{equation}}


%    ****************************************
%    *           SECTION HEADINGS           *
%    ****************************************
%
% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
%            optional * [ALTHEADING]{HEADING}
%    Generic command to start a section.
%    NAME       : e.g., 'subsection'
%    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
%                 section = 2, etc.  A section number will be printed if
%                 and only if LEVEL < or = the value of the secnumdepth
%                 counter.
%    INDENT     : Indentation of heading from left margin
%    BEFORESKIP : Absolute value = skip to leave above the heading.
%                 If negative, then paragraph indent of text following
%                 heading is suppressed.
%    AFTERSKIP  : if positive, then skip to leave below heading,
%                       else - skip to leave to right of run-in heading.
%    STYLE      : commands to set style
%
%  If '*' missing, then increments the counter.  If it is present, then
%  there should be no [ALTHEADING] argument.  A sectioning command
%  is normally defined to \@startsection + its first six arguments.
%
\def\section{\@startsection {section}{1}{\z@}
    {-3.5ex plus -1ex minus  -.2ex}
    {2.3ex plus .2ex}{\Large\bf}}
\def\subsection{\@startsection {subsection}{2}{\z@}
    {-3.25ex plus -1ex minus -.2ex}
    {1.5ex plus .2ex}{\large\bf}}
\def\subsubsection{\@startsection {subsubsection}{3}{\z@}
    {-3.25ex plus -1ex minus -.2ex}
    {1.5ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection {paragraph}{4}{\z@}
    {3.25ex plus 1ex minus .2ex}
    {-1em}{\normalsize\bf}}
\def\subparagraph{\@startsection {subparagraph}{4}{\parindent}
    {3.25ex plus 1ex minus .2ex}
    {-1em}{\normalsize\bf}}

%    ****************************************
%    *          SECTION NUMBERING           *
%    ****************************************
%
% For any counter CTR, \theCTR is a macro that defines the printed version
% of counter CTR.  It is defined in terms of the following macros:
%
%  \arabic{COUNTER} : The value of COUNTER printed as an arabic numeral.
%  \roman{COUNTER}  : Its value printed as a lower-case roman numberal.
%  \Roman{COUNTER}  : Its value printed as an upper-case roman numberal.
%  \alph{COUNTER}   : Value of COUNTER printed as a lower-case letter:
%                         1 = a, 2 = b, etc.
%  \Alph{COUNTER}   : Value of COUNTER printed as an upper-case letter:
%                           1 = A, 2 = B, etc.
%
\def\thepart          {\Roman{part}} % Roman numeral part numbers.
\def\thesection       {\arabic{section}}
\def\thesubsection    {\thesection.\arabic{subsection}}
\def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
\def\theparagraph     {\thesubsubsection.\arabic{paragraph}}
\def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}

%    ****************************************
%    *       TABLE OF CONTENTS ENTRIES      *
%    ****************************************
%
% \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE}
%    LEVEL    : An entry is produced only if LEVEL < or = value of
%               'tocdepth' counter.  Note, \chapter is level 0, \section
%               is level 1, etc.
%    INDENT   : The indentation from the outer left margin of the start of
%               the contents line.
%    NUMWIDTH : The width of a box in which the section number is to go,
%               if TITLE includes a \numberline command.
%
\def\l@section#1#2{
    \pagebreak [3]
    \addvspace{2\parskip}
    \begingroup
       { \bf
         \parindent    \z@
         \@tempdima    \@pnumwidth
         \rightskip    \@tocrmarg
         \parfillskip -\@tocrmarg
         \leavevmode #1\hfill#2\par}
    \endgroup}

\def\l@subsection    {\@dottedtocline{2} {1.5em} {2.3em}}
\def\l@subsubsection {\@dottedtocline{3} {3.8em} {3.2em}}
\def\l@paragraph     {\@dottedtocline{4} {7.0em} {4.1em}}
\def\l@subparagraph  {\@dottedtocline{5} {10em}  {5em}}

%    ****************************************
%    *         TABLE OF CONTENTS, ETC.      *
%    ****************************************
%
\setcounter{tocdepth}{4}

% TABLEOFCONTENTS
%
\def\tableofcontents{
    \section*{\@headtoc\@mkboth{\uppercase{\@headtoc}}{\uppercase{\@headtoc}}}
    \@starttoc{toc}}

% LIST OF FIGURES
%
\def\listoffigures{
    \section*{\@headlof\@mkboth{\uppercase{\@headlof}}{\uppercase{\@headlof}}}
    \@starttoc{lof}}
\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}

% LIST OF TABLES
%
\def\listoftables{
    \section*{\@headlot\@mkboth{\uppercase{\@headlot}}{\uppercase{\@headlot}}}
    \@starttoc{lot}}
\let\l@table\l@figure


%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
%
% The thebibliography environment executes the following commands:
%
%  \def\newblock{\hskip .11em plus .33em minus -.07em} --
%      Defines the `closed' format, where the blocks (major units of
%      information) of an entry run together.
%
%  \sloppy  -- Used because it's rather hard to do line breaks in
%      bibliographies,
%
%  \sfcode`\.=1000\relax --
%      Causes a `.' (period) not toproduce an end-of-sentence space.

\def\thebibliography#1{
    \section*{\@headbib\@mkboth{\uppercase{\@headbib}}{\uppercase{\@headbib}}}
    \list {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
                             \leftmargin\labelwidth
                             \advance\leftmargin\labelsep
                             \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist


%    ****************************************
%    *              THE INDEX               *
%    ****************************************
%
% THE THEINDEX ENVIRONMENT
% Produces double column format, with each paragraph a separate entry.
% The user commands \item, \subitem and \subsubitem are used to
% produce the entries, and \indexspace adds an extra vertical space
% that's the right size to put above the first entry with a new letter
% of the alphabet.

\def\theindex{
    \@restonecoltrue
    \if@twocolumn\@restonecolfalse\fi
    \columnseprule \z@
    \columnsep 35pt
    \twocolumn
    \section*{\@headidx\@mkboth{\uppercase{\@headidx}}{\uppercase{\@headidx}}}
    \thispagestyle{plain}
    \parindent\z@
    \parskip\z@ plus .3pt
    \relax
    \let\item\@idxitem}


%    ****************************************
%    *         FIGURES AND TABLES           *
%    ****************************************
%
% FIGURE                                % TABLE
%                                       %
\def\thefigure{\@arabic\c@figure}       \def\thetable{\@arabic\c@table}


%    ****************************************
%    *         TITLE AND ABSTRACT           *
%    ****************************************
%
% TITLEPAGE
%  In the normal environments, the titlepage environment does nothing but
%  start and end a page, and inhibit page numbers.  It also resets the
%  page number to zero.
%
\def\titlepage{
    \@restonecolfalse
    \if@twocolumn
       \@restonecoltrue
       \onecolumn
    \else
       \newpage
    \fi
    \thispagestyle{empty}
    \c@page\z@}
\def\endtitlepage{
    \if@restonecol
       \twocolumn
    \else
       \newpage
    \fi}

% MAKETITLE
%
% \maketitle ==
%  BEGIN
%    \par
%    \begingroup
%      redefine \@makefnmark so footnote marks take zero space (this make
%        centering look better)
%      \thefootnote == \fnsymbol{footnote} % to number by *, dagger, etc.
%      if @twocolumn = true
%        then  \twocolumn[\@maketitle]
%        else \@maketitle
%      fi
%   \thispagestyle{plain}
%   \@thanks   % \thanks defines \@thanks to have \footnotetext commands for
%              % producing footnotes.
%   \endgroup
%  END

\def\maketitle{\par
    \begingroup
       \def\thefootnote{\fnsymbol{footnote}}
       \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
       \if@twocolumn
          \twocolumn[\@maketitle]
          \else \newpage
          \global\@topnum\z@   % Prevents figures from going at top of page.
          \@maketitle
       \fi\thispagestyle{plain}\@thanks
    \endgroup
    \setcounter{footnote}{0}
    \let\maketitle\relax
    \let\@maketitle\relax
    \gdef\@thanks{}
    \gdef\@author{}
    \gdef\@title{}
    \let\thanks\relax}

\def\@maketitle{\newpage
    \null
    \vskip 2em                % Vertical space above title.
    \begin{center}
       {\LARGE \@title \par}     % Title set in \LARGE size.
       \vskip 1.5em              % Vertical space after title.
       { \large                  % each author set in \large, in a
         \lineskip .5em          % tabular environment
         \begin{tabular}[t]{c}
            \@author
         \end{tabular}\par}
       \vskip 1em                % Vertical space after author.
       {\large \@date}           % Date set in \large size.
    \end{center}
    \par
    \vskip 1.5em}             % Vertical space after date.

\def\abstract{
    \if@twocolumn
       \section*{\@headabstract
       \@mkboth{\uppercase{\@headabstract}}{\uppercase{\@headabstract}}}
    \else
       \small
       \begin{center}
          {\bf \@headabstract\vspace{-.5em}\vspace{0pt}}
       \end{center}
       \quotation
    \fi}
\def\endabstract{\if@twocolumn\else\endquotation\fi}


%    ****************************************
%    *           INITIALIZATION             *
%    ****************************************
%
% Default initializations

\if@twoside\else\raggedbottom\fi % Ragged bottom unless twoside option.
\makeatother                     % re-make @ a special character