1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%         The REDUCE Style option File --- LaTeX version.              %
3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4%
5% The document should start with:
6%   \documentstyle[11pt,reduce,makeidx]{...}
7%
8% This style adds the following commands:
9%    \COMPATNOTE{...}           For compatibility notes.
10%    \f{...}                    Sets function name is \tt.
11%    \k{...}                    Sets BNF keyword bold.
12%    \REDUCE                    REDUCE when needed as a word.
13%    \RLISP                     RLISP when needed as a word.
14%    \s{...}                    Sets BNF sentential form \em in <...>
15%    \meta                      An alternative for BNF italics in <...>
16%    \ttindex{...}              Puts index entry in \tt font.
17%
18%
19%
20% Basic religion about REDUCE documentation. No paragraph indentation,
21% bigger skip between lines, ragged bottom, and not as much vertical
22% space.
23%% RmS: setup of size dependent parameters. 11pt is assumed, so let's force it.
24
25\typeout{Document style option `reduce' -- released 28 Jul 1998.}
26
27%  ****************************************
28%  *               FONTS                  *
29%  ****************************************
30%
31
32\lineskip 1pt            % \lineskip is 1pt for all font sizes.
33\normallineskip 1pt
34\def\baselinestretch{1}
35
36% Each size-changing command \SIZE executes the command
37%        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
38% where:
39%   BASELINESKIP = Normal value of \baselineskip for that size. (Actual
40%                  value will be \baselinestretch * BASELINESKIP.)
41%
42%  \FONTSIZE     = Name of font-size command.  The currently available
43%                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
44%                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
45%                  \xivpt, \xviipt, \xxpt, \xxvpt.
46%  \@FONTSIZE    = The same as the font-size command except with an
47%                  '@' in front---e.g., if \FONTSIZE = \xivpt then
48%                  \@FONTSIZE = \@xivpt.
49%
50% For reasons of efficiency that needn't concern the designer,
51% the document style defines \@normalsize instead of \normalsize.  This
52% is done only for \normalsize, not for any other size-changing
53% commands.
54
55\def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
56\abovedisplayskip .5\baselineskip
57\belowdisplayskip \abovedisplayskip
58\abovedisplayshortskip  \z@ plus3\p@
59\belowdisplayshortskip  6.5\p@ plus3.5\p@ minus3\p@
60\let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
61
62\def\small{\@setsize\small{12pt}\xpt\@xpt
63\abovedisplayskip .5\baselineskip
64\belowdisplayskip \abovedisplayskip
65\abovedisplayshortskip  \z@ plus3\p@
66\belowdisplayshortskip  6\p@ plus3\p@ minus3\p@
67\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
68\topsep \z@\parsep 3\p@ plus2\p@ minus\p@
69\itemsep .5\baselineskip}}
70
71\def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
72\abovedisplayskip .5\baselineskip
73\belowdisplayskip \abovedisplayskip
74\abovedisplayshortskip \z@ plus\p@
75\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
76\def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
77\topsep \z@ \parsep 2\p@ plus\p@ minus\p@
78\itemsep .5\baselineskip}}
79
80\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
81\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
82\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
83\def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
84\def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
85\def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
86\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
87
88\normalsize  % Choose the normalsize font.
89
90
91%  ****************************************
92%  *            PAGE LAYOUT               *
93%  ****************************************
94%
95% All margin dimensions measured from a point one inch from top and side
96% of page.
97
98% SIDE MARGINS:
99\if@twoside               % Values for two-sided printing:
100   \oddsidemargin 36pt    %   Left margin on odd-numbered pages.
101   \evensidemargin 74pt   %   Left margin on even-numbered pages.
102   \marginparwidth 100pt  %   Width of marginal notes.
103\else                     % Values for one-sided printing:
104   \oddsidemargin 54pt    %   Note that \oddsidemargin = \evensidemargin
105   \evensidemargin 54pt
106   \marginparwidth 83pt
107\fi
108\marginparsep 10pt        % Horizontal space between outer margin and
109                          % marginal note
110
111
112% VERTICAL SPACING:
113                         % Top of page:
114\topmargin 27pt          %    Nominal distance from top of page to top
115                         %    of box containing running head.
116\headheight 12pt         %    Height of box containing running head.
117\headsep 25pt            %    Space between running head and text.
118% \topskip = 10pt        %    '\baselineskip' for first line of page.
119                         % Bottom of page:
120\footskip 30pt           %    Distance from baseline of box containing
121                         %    foot to baseline of last line of text.
122
123% DIMENSION OF TEXT:
124% 24 Jun 86: changed to explicitly compute \textheight to avoid
125% roundoff.  The value of the multiplier was calculated as the floor of
126% the old \textheight minus \topskip, divided by \baselineskip for
127% \normalsize.  The old value of \textheight was 530.4pt.
128% \textheight is the height of text (including footnotes and figures,
129% excluding running head and foot).
130
131\textheight = 38\baselineskip
132\advance\textheight by \topskip
133\textwidth 360pt         % Width of text line.
134                         % For two-column mode:
135\columnsep 10pt          %    Space between columns
136\columnseprule 0pt       %    Width of rule between columns.
137
138% A \raggedbottom command causes 'ragged bottom' pages: pages set to
139% natural height instead of being stretched to exactly \textheight.
140
141% FOOTNOTES:
142
143\footnotesep 7.7pt    % Height of strut placed at the beginning of every
144                      % footnote = height of normal \footnotesize strut,
145                      % so no extra space between footnotes.
146
147\skip\footins 10pt plus 4pt minus 2pt  % Space between last line of text
148                                       % and  top of first footnote.
149
150% FLOATS: (a float is something like a figure or table)
151%
152%  FOR FLOATS ON A TEXT PAGE:
153%
154%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
155\floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats
156                                         % moved to top or bottom of
157                                         % text page.
158\textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and
159                                         % floats at top or bottom of
160                                         % page.
161\intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures
162                                         % and text.
163% In LaTeX2e, \@maxsep no longer exists
164\@ifundefined{@maxsep}{}%
165{\setlength{\@maxsep}{20pt}}             % The maximum of \floatsep,
166                                         % \textfloatsep and \intextsep
167                                         % (minus the stretch and
168                                         % shrink).
169%    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
170\dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for
171                                         % double-column figures in
172                                         % two-column mode.
173\dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for
174                                         % double-column floats.
175% In LaTeX2e, \@dblmaxsep no longer exists
176\@ifundefined{@dblmaxsep}{}%
177{\setlength{\@dblmaxsep}{20pt}}          % The maximum of \dblfloatsep
178                                         % and \dbltexfloatsep.
179
180%  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
181%    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
182\@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must
183                         % be 0pt plus ...)
184\@fpsep 8pt plus 2fil    % Space between floats on float page/column.
185\@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must
186                         % be 0pt plus ... )
187
188%   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
189\@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt
190                         % plus ...)
191\@dblfpsep 8pt plus 2fil % Space between floats on float page.
192\@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
193                         % 0pt plus ... )
194% MARGINAL NOTES:
195%
196\marginparpush 5pt       % Minimum vertical separation between two
197                         % marginal notes.
198
199
200%  ****************************************
201%  *           PARAGRAPHING               *
202%  ****************************************
203%
204\parskip 6pt plus 1pt     %% RmS   % Extra vertical space between
205                                   % paragraphs.
206\parindent 0pt            %% RmS   % Width of paragraph indentation.
207\topsep 0pt               %% RmS   % Extra vertical space, in addition
208                                   % to \parskip, added above and below
209                                   % list and paragraphing environments.
210\partopsep 0pt            %% RmS   % Extra vertical space, in addition
211                                   % to \parskip and \topsep, added when
212                                   % user leaves blank line before
213                                   % environment.
214\itemsep \topsep          %% RmS   % Extra vertical space, in addition
215                                   % to \parskip, added between list
216                                   % items.
217% See \@listI for values of \topsep and \itemsep
218
219% The following page-breaking penalties are defined
220
221\@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
222\@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
223\@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
224
225\@beginparpenalty -\@lowpenalty    % Before a list or paragraph
226                                   % environment.
227\@endparpenalty   -\@lowpenalty    % After a list or paragraph
228                                   % environment.
229\@itempenalty     -\@lowpenalty    % Between list items.
230
231% \clubpenalty         % 'Club line'  at bottom of page.
232% \widowpenalty        % 'Widow line' at top of page.
233% \displaywidowpenalty % Math display widow line.
234% \predisplaypenalty   % Breaking before a math display.
235% \postdisplaypenalty  % Breaking after a math display.
236% \interlinepenalty    % Breaking at a line within a paragraph.
237% \brokenpenalty       % Breaking after a hyphenated line.
238
239
240%    ****************************************
241%    *             SECTIONS                 *
242%    ****************************************
243%
244
245% \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
246%            optional * [ALTHEADING]{HEADING}
247%    Generic command to start a section.
248%    NAME       : e.g., 'subsection'
249%    LEVEL      : a number, denoting depth of section -- i.e.,
250%                 section=1, subsection = 2, etc.  A section number will
251%                 be printed if and only if LEVEL < or = the value of
252%                 the secnumdepth counter.
253%    INDENT     : Indentation of heading from left margin
254%    BEFORESKIP : Absolute value = skip to leave above the heading.
255%                 If negative, then paragraph indent of text following
256%                 heading is suppressed.
257%    AFTERSKIP  : if positive, then skip to leave below heading,
258%                       else - skip to leave to right of run-in heading.
259%    STYLE      : commands to set style
260%  If '*' missing, then increments the counter.  If it is present, then
261%  there should be no [ALTHEADING] argument.  A sectioning command
262%  is normally defined to \@startsection + its first six arguments.
263
264\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus
265    -.2ex}{2.3ex plus.2ex}{\reset@font\Large\bf}}
266\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex
267     minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\bf}}
268\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
269     -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bf}}
270\def\paragraph{\@startsection
271     {paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}{\reset@font
272     \normalsize\bf}}
273\def\subparagraph{\@startsection
274     {subparagraph}{4}{\parindent}{3.25ex plus1ex minus
275     .2ex}{-1em}{\reset@font\normalsize\bf}}
276
277
278% Default initializations of \...mark commands.  (See below for their
279% use in defining page styles.
280%
281
282% \def\sectionmark#1{}           % Preloaded definitions
283% \def\subsectionmark#1{}
284% \def\subsubsectionmark#1{}
285% \def\paragraphmark#1{}
286% \def\subparagraphmark#1{}
287
288% The value of the counter secnumdepth gives the depth of the
289% highest-level sectioning command that is to produce section numbers.
290%
291
292\setcounter{secnumdepth}{3}
293
294% APPENDIX
295%
296% The \appendix command must do the following:
297%    -- reset the section and subsection counters to zero
298%    -- redefine the section counter to produce appendix numbers
299%    -- redefine the \section command if appendix titles and headings
300%       are to look different from section titles and headings.
301
302\def\appendix{\par
303  \setcounter{section}{0}
304  \setcounter{subsection}{0}
305  \def\thesection{\Alph{section}}}
306
307
308%    ****************************************
309%    *                LISTS                 *
310%    ****************************************
311%
312
313% The following commands are used to set the default values for the list
314% environment's parameters. See the LaTeX manual for an explanation of
315% the meanings of the parameters.  Defaults for the list environment are
316% set as follows.  First, \rightmargin, \listparindent and \itemindent
317% are set to 0pt.  Then, for a Kth level list, the command \@listK is
318% called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
319% called for a third-level list.)  By convention, \@listK should set
320% \leftmargin to \leftmarginK.
321%
322
323\leftmargini 2.5em
324\leftmarginii 2.2em     % > \labelsep + width of '(m)'
325\leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
326\leftmarginiv 1.7em     % > \labelsep + width of 'M.'
327\leftmarginv 1em
328\leftmarginvi 1em
329
330\leftmargin\leftmargini
331\labelsep .5em
332\labelwidth\leftmargini\advance\labelwidth-\labelsep
333%\parsep 4.5pt plus 2pt minus 1pt  %(Removed 9 Jun 87)
334
335% \@listI defines top level and \@listi values of
336% \leftmargin, \topsep, \parsep, and \itemsep
337% (Added 9 Jun 87)
338\def\@listI{\leftmargin\leftmargini \parsep 4.5\p@ plus2\p@ minus\p@
339\topsep \z@ \itemsep \topsep}
340
341\let\@listi\@listI
342\@listi
343
344\def\@listii{\leftmargin\leftmarginii
345   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
346   \topsep \z@ \itemsep \topsep
347   \parsep 2\p@ plus\p@ minus\p@}
348
349\def\@listiii{\leftmargin\leftmarginiii
350    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
351    \topsep \z@ \itemsep \topsep
352    \parsep \z@ \partopsep\z@}
353
354\def\@listiv{\leftmargin\leftmarginiv
355     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
356
357
358
359
360
361%% RmS: which at the same time makes the vertical space in lists (verbatim...)
362%% too large if not other precautions are taken.
363\setlength{\parindent}{0pt}
364\setlength{\parskip}{6pt}
365\raggedbottom
366
367
368% Various boxes.
369\newlength{\reduceboxwidth}
370\setlength{\reduceboxwidth}{4in}
371
372\newlength{\redboxwidth}
373\setlength{\redboxwidth}{3.5in}
374
375\newlength{\rboxwidth}
376\setlength{\rboxwidth}{2.6in}
377
378% These are here in case the name changes or we someday want a special
379% font.
380\newcommand{\REDUCE}{REDUCE}
381\newcommand{\RLISP}{RLISP}
382
383% This is useful for putting function names in \tt format in the index.
384\newcommand{\ttindex}[1]{\index{#1@{\tt #1}}}
385
386% Use this when you are speaking about problems across systems.
387\newcommand{\COMPATNOTE}{{\em Compatibility Note:\ }}
388
389\pagestyle{headings}
390
391%% For BNF notation.
392
393% \s{...} is a sentential form in descriptions. Enclosed \em text in <...>
394\newcommand{\s}[1] {$<${\em #1}$>$}
395
396% \meta{...} is an alternative sentential form in descriptions using \it.
397\newcommand{\meta}[1]{\mbox{$\langle$\it#1\/$\rangle$}}
398
399% \k{...} is a keyword. Just do in bold for the moment.
400\@ifundefined{k}{}{\let\k\relax} % undefine \k (LaTeX2e)
401\newcommand{\k}[1] {{\bf #1}}
402
403% \f is a function name. Just do this as tt.
404\newcommand{\f}[1] {{\tt #1}}
405
406% An example macro for numbering and indenting examples.
407\newcounter{examplectr}
408\newcommand{\example}{\refstepcounter{examplectr}
409\noindent{\bf Example \theexamplectr}}
410
411% The following are currently only used in the GENTRAN document.  However,
412% there's no objection to using them elsewhere.
413
414\begingroup
415  \catcode `|=0
416  \catcode `[= 1
417  \catcode`]=2
418  \catcode `\{=12
419  \catcode `\}=12
420  \catcode`\\=12
421  |gdef|@xframedverbatim#1\end{framedverbatim}[#1|end[framedverbatim]]
422  |gdef|@sxframedverbatim#1\end{framedverbatim*}[#1|end[framedverbatim*]]
423|endgroup
424
425\newdimen\@mcdheight
426
427\def\@sframedverbatim{\obeyspaces\@framedverbatim}
428
429\def\@mcdrule{\@mcdheight=\baselineskip\advance\@mcdheight by-2pt
430\setbox0=\hbox{\vrule height\@mcdheight depth 2pt width 1pt}%
431\ht0=\@mcdheight\dp0=0pt\wd0=1pt\box0}
432
433\def\@mcdendrule{\@mcdheight=\baselineskip%
434\setbox0=\hbox{\vrule height\@mcdheight depth 2pt width 1pt}%
435\ht0=\@mcdheight\dp0=0pt\wd0=1pt\box0}
436
437\def\@framedverbatim{\trivlist \item[]
438\parskip \z@
439\hrule \@height \p@ \@depth \z@ \@width\textwidth
440\everypar{\global \@minipagefalse \global \@newlistfalse \if@inlabel
441\global \@inlabelfalse \hskip -\parindent \box \@labels \penalty \z@ \fi
442\hbox to6\p@{\rlap{\@mcdrule}\hskip\textwidth\llap{\@mcdrule}\hss}}%
443\if@minipage\else\vskip\parskip\fi
444\leftskip\@totalleftmargin\rightskip\z@
445\parindent\z@\parfillskip\@flushglue\parskip\z@
446\@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par
447\penalty\interlinepenalty}%   % fix \samepage bug
448\obeylines \tt \catcode``=13 \@noligs \let\do\@makeother \dospecials}
449
450\def\framedverbatim{\@framedverbatim \frenchspacing\@vobeyspaces
451                    \@xframedverbatim}
452
453\def\endframedverbatim{\nointerlineskip
454{\everypar{}\baselineskip 4\p@\vbox to4\p@{\par\noindent\hbox
455      to6pt{\rlap{\@mcdendrule}\hskip\textwidth\llap{\@mcdendrule}\hss}}%
456\vskip\p@\hrule \@height \p@ \@depth \z@ \@width\textwidth}\endtrivlist}
457
458\@namedef{framedverbatim*}{\@framedverbatim\@sxframedverbatim}
459
460\expandafter\let\csname endframedverbatim*\endcsname =\endtrivlist
461
462% Will print out a heading in bold, and then indent the following text.
463\def\indented{\list{}{
464 \itemindent\listparindent
465 \rightmargin\leftmargin}\item[]}
466\let\endindented=\endlist
467\newenvironment{describe}[1]{\par{\bf #1}\begin{indented}}{\end{indented}}
468
469\@ifundefined{reset@font}{\let\reset@font\@empty}{}
470
471\endinput
472