summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex209/contrib/svlatex/svmult.sty
blob: e8fa6776394dd1c29e1e24384908ac1664c59ac6 (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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
% Copyright (C) 1988 Springer-Verlag, Inc.
% 
% Everyone is granted permission to copy and redistribute this file, as
% long as it is unchanged.
%
%
% smva.sty 01 Nov 87
%
%
\newif\if@multipleauthors
\@ifundefined{@svsa}{%
        \@multipleauthorstrue
        \typeout{Sub-style 'svmult' (Springer-Verlag Multi-Authored). Released January 1993}}%
        {\@multipleauthorsfalse}
\ds@twoside
\headheight=9pt
\headsep=15pt   % 2pc-9pt
\textheight=45pc
\textwidth=27pc
\parindent=1em
%
% Running head: 9 pt CM, c/lc, 2em# inside of fl. outside folio, base aligns
% with folio; recto: CN, period, word # to CT; verso: contributor's name(s).
% In single-author, verso: SN, period, word # to ST.
%
% If you want the running heads on the opposite pages, just put \flipheads
% after the documentstyle.  LaTeX isn't bright enough to allow one option
% file to define ds@flipheads.
%
\newif\if@flipheads \@flipheadsfalse
\def\flipheads{\@flipheadstrue}
\def\ps@headings{\let\@mkboth=\markboth % Instead of \@gobbletwo, for toc
        \def\@oddfoot{}\def\@evenfoot{}%       No feet.
        \if@flipheads
            \def\@oddhead{\ixONxi\rm
                \hbox{}\hfil{\rightmark}\hskip 2em minus 1em\thepage}%
            \def\@evenhead{\ixONxi\rm \thepage\hskip 2em\leftmark \hfill}%
        \else
            \def\@oddhead{\ixONxi\rm
                \hbox{}\hfil{\leftmark}\hskip 2em minus 1em\thepage}%
            \def\@evenhead{\ixONxi\rm \thepage\hskip 2em\rightmark \hfill}%
        \fi
        \def\chaptermark##1{\markbothsame{\ifnum \c@secnumdepth >\m@ne
              \@chapapp\ %\thechapter. \ 
   \fi ##1}}%
        \if@multipleauthors
            \def\sectionmark##1{}%
        \else
            \def\sectionmark##1{\markleft{\ifnum \c@secnumdepth >\z@
                 \thesection. \ \fi ##1}}%
        \fi
}

\pagestyle{headings}
\pagenumbering{roman}   % toc is in roman
\def\@chapterauthors{}
\def\markbothsame#1{\markboth{#1}{#1}}
\def\markleft#1{{\let\protect\noexpand\expandafter\@markleft\@themark
     {#1}\mark{\@themark}}}
\def\@markleft#1#2#3{\gdef\@themark{{#3}{#2}}}
\def\leftmark{\expandafter\@leftmark\topmark}
%
% All pages without running heads must carry corner marks.
%
\def\clap#1{\hbox to 0pt{\hss#1\hss}}
\newdimen\@crosshairrule \@crosshairrule=.24pt
\def\@crosshairs{\vbox to 0pt{\hsize=0pt\baselineskip=0pt\lineskip=0pt
                \vss
                \clap{\vrule height .125in width \@crosshairrule depth 0pt}
                \clap{\vrule width .25in height \@crosshairrule depth 0pt}
                \clap{\vrule height .125in width \@crosshairrule depth 0pt}
                \vss}}
\def\ps@empty{%
\def\@oddhead{\hfill\raise\headheight\@crosshairs}
\let\@evenhead\@oddhead
\def\@evenfoot{}\let\@oddfoot\@evenfoot}
\frenchspacing
\def\@chapapp{}
\def\viiiONx{\@setsize\viiiONx{10pt}\viipt\@viipt}
\def\ixONxi{\@setsize\ixONxi{11pt}\ixpt\@ixpt}
\def\xONxii{\normalsize}
\def\xiiONxiv{\@setsize\xiiONxiv{14pt}\xiipt\@xiipt}
\def\xivONxvi{\@setsize\xivONxvi{16pt}\xivpt\@xivpt}
\def\xivONxiv{\@setsize\xivONxiv{14pt}\xivpt\@xivpt}
\def\xxONxx{\@setsize\xxONxx{20pt}\xxpt\@xxpt}
\font\chnum = cmr10 scaled \magstep5

\def\chapter{\cleardoublepage      % Starts new recto.
   \thispagestyle{empty}     % Page style of chapter page is 'empty'
   \global\@topnum\z@        % Prevents figures from going at top of page.
   \@afterindentfalse        % Suppresses indent in first paragraph.  Change
   \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.

%
% Chapter number: 24 CM  arabic numeral, fl.l, top text
% Chapter title: 20/20 CM x 27pc, c/lc, fl.l, sink 60 pt from top
%       type to base of CT, to's fl.l, do not hyphenate

\def\@makechapterhead#1{             % Heading for \chapter command
% We want the chapter number to be 20 pts from top text.  The simplest
% was is to set \topskip, making sure there's nothing between the number
% and the top of page, so \baselineskip doesn't come in.
  { \topskip=20pt \parindent 0pt \raggedright 
    \xxONxx\rm
    \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
     \@chapapp{} {\chnum \thechapter} % Print 'Chapter' and number.
 \par 
 \vskip 6pt \fi             % Space between number and title.
  #1\par                      % Title.
   \nobreak                    % TeX penalty to prevent page break.
   \vskip-\prevdepth           % Fool TeX into ignoring the depth of
   \prevdepth=0pt              % the CT when spacing to the CA
   \if@multipleauthors
    \vskip 30pt                % 2.5pi b/b between title and chapter authors
   \else
    \vskip 44pt        % want ~60pt b/b to abstract
   \fi
}
 }

\def\@makeschapterhead#1{             % Heading for \chapter* command
  { \topskip=44pt \parindent 0pt \raggedright 
    \xxONxx\rm
    #1\par                      % Title.
    \nobreak                    % TeX penalty to prevent page break.
    \vskip-\prevdepth           % Fool TeX into ignoring the depth of
    \prevdepth=0pt              % the CT when spacing to the CA
    \if@multipleauthors
     \vskip 30pt                % 2.5pi b/b between title and chapter authors
    \else
     \vskip 44pt                % want ~60pt b/b to abstract
    \fi

  } }

\if@multipleauthors
\gdef\chapterauthors#1{%
        {\def\\{, }\def\footnote##1{}\def\footnotemark[##1]{}%
                \xdef\@chapterauthors{#1}}%
        \markright{\@chapterauthors}%
        {\parindent0pt \raggedright\xivONxiv\rm #1\par
                \nobreak
           \vskip 12pt
}}\fi

%
% Restart the footnote counter each chapter.
%
%\newcounter{footnote}[chapter]
%
% FN    1pc space above footnotes to text.
%       5 pc 1/2 pt rule fl.l. above footnotes
%       leave 6pt # after rule followed by ftn
%
\skip\footins=18.5pt    % space above line and below line, 1pc+6pt+.5pt
\footskip=16pt
\footnotesep=7pt        % pretty arbitrary
\def\footnotesize{\@setsize\footnotesize{10pt}\ixpt\@ixpt}
\def\footnoterule{\kern-6.5pt\hrule width 5pc height .5pt\vskip 6pt}
%
% Footnote at end of chapter position below last text line (not at bottom
% of page).
%
\def\clearpage{\par\penalty -\@M \write\m@ne{}\vbox{}\penalty -\@Mi}
\def\@makecol{\ifvoid\footins \setbox\@outputbox\box\@cclv
   \else\setbox\@outputbox
     \vbox{\unvbox\@cclv\vskip\skip\footins\footnoterule\unvbox\footins}\fi
     \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
     \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
        \@texttop
        \@tempdima=\@colht \multiply\@tempdima by 10 \divide\@tempdima by 9
        \ifdim \ht\@outputbox<\@tempdima
                \unvbox\@outputbox \vfill
        \else
                \unvbox\@outputbox
        \fi
        \@textbottom}\global\maxdepth\@maxdepth}
%
% Abstract: 9/11 TRx25pi, sink 2.5pi b/b from CA
%
\def\abstract{\vskip 9pt % from CA
\rightskip=1pc\leftskip=1pc\parindent=\z@
\ixONxi\rm
{ABSTRACT }}
\def\endabstract{\par}  % If we don't do this, the paragraph won't be
                        % set until after rightskip and leftskip have been
                        % returned to their old values.

\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \fi\chapter*{Contents\@mkboth{Contents}{Contents}}
  \@starttoc{toc}\if@restonecol\twocolumn\fi}

%
% Don't indent the paragraph following each header.  Vertical distances
% showld have \baselineskip taken out, and the height of the next
% line, which should be text (10/12 TR).
%
\setcounter{secnumdepth}{2}     % number section and subsections
\setcounter{tocdepth}{2}        % and put them in the table of contents
% No 1 Head, 14/16 CM, 36pt b/b above, 24 tp b/b below
\def\section{\@startsection
    {section}{1}{\z@}{-21pt plus 6pt minus 1pt}{12pt plus 2pt}%
        {\xivONxvi\rm\raggedright}}
% No 2 Head, 12/14 CM italic, 30pt above, 18 pt below
\def\subsection{\@startsection
    {subsection}{2}{\z@}{-16pt plus 4pt minus 1pt}{6pt plus 1pt}%
        {\xiiONxiv\it\raggedright}}
% No 3 Head, 10/12 CM, 24pt above, 18pt below
\def\subsubsection{\@startsection
    {subsubsection}{3}{\z@}{-12pt plus 3pt minus 1pt}{6pt plus 1pt}%
        {\xONxii\rm\raggedright}}
% No 4 Head, 10/12 CM italic, 20pt above, 18pt below
\def\paragraph{\@startsection
     {paragraph}{4}{\z@}{-8pt plus 2pt minus .5pt}{6pt plus 1pt}%
        {\xONxii\it\raggedright}}
% No 5 Head, 10/12 CM italic, period,  en space to run in text, 18pt above
\def\subparagraph#1{\@startsection
     {subparagraph}{5}{\z@}{-6pt plus 2pt minus .5pt}{-.5em}{\xONxii\it}{#1.}}
% Ack: Acknowledgements same as No 5 head, 36pt above
\def\acknowledgments{\@startsection
     {subparagraph}{6}{\z@}{-24pt plus 6pt minus 1pt}{-.5em}%
        {\xONxii\it}*{Acknowledgments:\/}}
% R-1: ``References'', same as No.2 head
% unless it's single-author.
\def\mainbibliography#1{{\@multipleauthorsfalse\bibliography{#1}}}
\def\thebibliography#1{%
\if@multipleauthors
  \@startsection
    {section}{2}{\z@}{-16pt plus 4pt minus 1pt}{6pt plus 1pt}%
        {\xiiONxiv\rm\raggedright}{References}%
\else
  \chapter*{References\@mkboth
  {References}{References}}%
  \addcontentsline{toc}{chapter}{\protect\numberline{}References}%
\fi
%endif
  \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}
% Put index in the toc
\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35pt\twocolumn[\@makeschapterhead{Index}]
    \addcontentsline{toc}{chapter}{\protect\numberline{}Index}%
    \@mkboth{Index}{Index}\thispagestyle{empty}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}
\def\theauthorindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35pt\twocolumn[\@makeschapterhead{Author Index}]
    \addcontentsline{toc}{chapter}{\protect\numberline{}Author Index}%
    \@mkboth{Author Index}{Author Index}\thispagestyle{empty}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}
\def\thesubjectindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35pt\twocolumn[\@makeschapterhead{Subject Index}]
    \addcontentsline{toc}{chapter}{\protect\numberlin6e{}Subject Index}%
    \@mkboth{Subject Index}{Subject Index}\thispagestyle{empty}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}
\def\thesymbolindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35pt\twocolumn[\@makeschapterhead{Symbol Index}]
    \addcontentsline{toc}{chapter}{\protect\numberline{}Symbol Index}%
    \@mkboth{Symbol Index}{Symbol Index}\thispagestyle{empty}\parindent\z@
    \parskip\z@ plus .3pt\relax\let\item\@idxitem}

%
% lists: 10/12 TRx27pc, 1/2line# above/below
%
\topsep 6pt plus 3pt minus 1pt     % Extra vertical space, in addition to 
                                   % \parskip, added above and below list and
                                   % paragraphing environments.
\itemsep 6pt plus 2pt minus 1pt    % Extra vertical space, in addition to
                                   % \parskip, added between list items.
%
% Eq: Center on text width; equation numbers set flush right, align with
% last line of equation, 6pt # above/below.
%
\abovedisplayskip=6pt plus 1.5pt minus 3pt
\belowdisplayskip=\abovedisplayskip
\abovedisplayshortskip=\z@ plus 1.5pt
\belowdisplayshortskip=3pt plus 1.5pt minus 1.5pt
%
% FL: Figure legends ``FIGURE 0.0'' 9/11 CM, c/lc, period, word # to text.
%
\long\def\@makecaption#1#2{{
   \vskip 10pt
   \ixONxi
   \setbox\@tempboxa\hbox{#1. #2}
   \ifdim \wd\@tempboxa >\hsize   % IF longer than one line:
       \unhbox\@tempboxa\hfil\par      %   THEN set as ordinary paragraph.
     \else                        %   ELSE  center.
       \hbox to\hsize{\hfil\box\@tempboxa\hfil}
   \fi}}
\def\fnum@figure{\ixONxi FIGURE \thefigure}%
%
% TN+TT: ``TABLE 0.0'' 9/11 TR, c/lc. period, word # to table title:
% 3 pt # below to 1/2 pt rule x table measuer, 3 pt # below rule to
% TCH
%
\arrayrulewidth=.5pt
\def\fnum@table{\ixONxi TABLE~\thetable}
\def\TableSubtitleRule{\noalign{\vskip 3pt}\hline\noalign{\vskip 3pt}}
\long\def\TableFootnote#1{\gdef\TFN{#1}}

\def\@@startpbox#1{\vtop\bgroup \hsize #1\@arrayparboxrestore
\parindent=-1em\leftskip=1em}
\newsavebox{\@stablebox}
\def\stable#1#2{\@ifnextchar[{\@stable{#1}{#2}}{\@stable{#1}{#2}[h]}}
\def\@stable#1#2[#3]{\begin{table}[#3]
        \def\foo{#1}\def\TFN{}%
        \viiiONx
        \setbox\@stablebox=\hbox\bgroup
        \begin{tabular}{#2}%
        \noalign{\vskip 3pt}
        \hline
        \noalign{\vskip 3pt}}
\@namedef{endstable}{\crcr\noalign{\vskip 6pt}\hline\end{tabular}\egroup
$$\vbox{\hsize=\wd\@stablebox
\caption{\foo}
\box\@stablebox
\prevdepth=0pt  % last thing was a rule
\par
\TFN}$$
\end{table}}
%%%% GROT.  This is hacked to move a label definition outside.
%%%% I think the whole stable idea is broken.

\def\stable#1#2{\@ifnextchar[{\@stable{#1}{#2}}{\@stable{#1}{#2}[h]}}
\def\@stable#1#2[#3]{\table[#3]
        \def\foo{#1}\def\TFN{}\def\stablelabel{}%
        \viiiONx
        \setbox\@stablebox=\hbox\bgroup\def\label##1{\gdef\stablelabel{\label{##1}}}%
        \tabular{#2}%
        \noalign{\vskip 3pt}%
        \hline
        \noalign{\vskip 3pt}}
\@namedef{endstable}{\crcr\noalign{\vskip 6pt}\hline\endtabular\egroup
$$\vbox{\hsize=\wd\@stablebox
\caption{\foo}\stablelabel
\box\@stablebox
\prevdepth=0pt  % last thing was a rule
\par
\TFN}$$
\endtable}

\def\stablecont#1#2{\@ifnextchar[{\@stablecont{#1}{#2}}{\@stablecont{#1}{#2}[h]}}
\def\@stablecont#1#2[#3]{\table[#3]
        \def\foo{#1}\def\TFN{}
        \viiiONx
        \setbox\@stablebox=\hbox\bgroup\def\label{\error}
        \tabular{#2}%
        \noalign{\vskip 3pt}%
        \hline
        \noalign{\vskip 3pt}}
\@namedef{endstablecont}{\crcr\noalign{\vskip 6pt}\hline\endtabular\egroup
$$\vbox{\hsize=\wd\@stablebox
  \begingroup
    \@parboxrestore
        \vskip 10pt
        \ixONxi
           \setbox\@tempboxa\hbox{\ignorespaces \foo}
           \ifdim \wd\@tempboxa >\hsize   % IF longer than one line:
               \unhbox\@tempboxa\hfil\par      %   THEN set as ordinary paragraph.
             \else                        %   ELSE  center.
               \hbox to\hsize{\hfil\box\@tempboxa\hfil}
           \fi\par
  \endgroup
\box\@stablebox
\prevdepth=0pt  % last thing was a rule
\par
\TFN}$$
\endtable}

%%%%
\newdimen\stabularwidth

\def\stabular{\@ifnextchar[{\@stabular}{\@stabular[h]}}
\def\@stabular[#1]#2{
        \setbox\@stablebox=\hbox\bgroup\viiiONx
        \tabular[#1]{#2}%
        \noalign{\vskip 3pt}%
        \hline
        \noalign{\vskip 3pt}}
\def\endstabular{\crcr\noalign{\vskip 6pt}\hline\endtabular\egroup
\stabularwidth=\wd\@stablebox
\box\@stablebox}

\def\thefigure{\@arabic\c@figure}  %% deletes Chap No from Section.

\def\appendix{\par
 \setcounter{chapter}{0}
 \setcounter{section}{0}
 \def\@chapapp{}
 \def\thechapter{\Alph{chapter}}}