home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / tex / inputs.sit / TeX-inputs / bk12.doc < prev    next >
Text File  |  1989-09-18  |  17KB  |  406 lines

  1. % BOOK DOCUMENT STYLE -- Released 19 Jan 88
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1988 by Leslie Lamport
  4.  
  5. % PREPARING A FOREIGN LANGUAGE VERSION:
  6. %
  7. % This document style is for documents prepared in the English language.
  8. % To prepare a version for another language, various English words must
  9. % be replaced.  All the English words that required replacement are
  10. % indicated below, where we give the name of the command in which the
  11. % words appear, and the entire line containing the word(s), with the
  12. % actual words underlined.
  13. % \appendix:
  14. %   \def\@chapapp{Appendix}
  15. %                 ~~~~~~~~
  16.  
  17. %  ****************************************
  18. %  *               FONTS                  *
  19. %  ****************************************
  20. %
  21.  
  22. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  23. \normallineskip 1pt
  24. \def\baselinestretch{1}
  25.  
  26. % Each size-changing command \SIZE executes the command
  27. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  28. % where:
  29. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  30. %                  value will be \baselinestretch * BASELINESKIP.)
  31. %
  32. %  \FONTSIZE     = Name of font-size command.  The currently available
  33. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  34. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  35. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  36. %  \@FONTSIZE    = The same as the font-size command except with an
  37. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  38. %                  \@FONTSIZE = \@xivpt.
  39. %
  40. % For reasons of efficiency that needn't concern the designer,
  41. % the document style defines \@normalsize instead of \normalsize .  This is
  42. % done only for \normalsize, not for any other size-changing commands.
  43.  
  44. \def\@normalsize{\@setsize\normalsize{14.5pt}\xiipt\@xiipt
  45. \abovedisplayskip 12pt plus3pt minus7pt%
  46. \belowdisplayskip \abovedisplayskip
  47. \abovedisplayshortskip  \z@ plus3pt%   
  48. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt%
  49. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  50.  
  51.  
  52. \def\small{\@setsize\small{13.6pt}\xipt\@xipt
  53. \abovedisplayskip 11pt plus3pt minus6pt%
  54. \belowdisplayskip \abovedisplayskip
  55. \abovedisplayshortskip  \z@ plus3pt%   
  56. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt
  57. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  58. \parsep 4.5pt plus 2pt minus 1pt
  59.             \itemsep \parsep
  60.             \topsep 9pt plus 3pt minus 5pt}}
  61.  
  62. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
  63. \abovedisplayskip 10pt plus2pt minus5pt%
  64. \belowdisplayskip \abovedisplayskip
  65. \abovedisplayshortskip  \z@ plus3pt%   
  66. \belowdisplayshortskip  6pt plus3pt minus3pt
  67. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  68. \topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  69. \itemsep \parsep}}
  70.  
  71. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  72. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  73. \def\large{\@setsize\large{18pt}\xivpt\@xivpt}
  74. \def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
  75. \def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
  76. \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
  77. \let\Huge=\huge
  78.  
  79. \normalsize  % Choose the normalsize font.
  80.  
  81.  
  82. %  ****************************************
  83. %  *            PAGE LAYOUT               *
  84. %  ****************************************
  85. %
  86. % All margin dimensions measured from a point one inch from top and side
  87. % of page.  
  88.  
  89. % SIDE MARGINS:
  90. \oddsidemargin .25in      % Left margin on odd-numbered pages.
  91. \evensidemargin 1.25in      % Left margin on even-numbered pages.
  92.  
  93. \marginparwidth 1in    %   Width of marginal notes.
  94. \marginparsep 7pt        % Horizontal space between outer margin and 
  95.                          % marginal note
  96.  
  97.  
  98. % VERTICAL SPACING:        
  99.                          % Top of page:
  100. \topmargin .73in         %    Nominal distance from top of page to top of
  101.                          %    box containing running head.
  102. \headheight 12pt         %    Height of box containing running head.
  103. \headsep .275in          %    Space between running head and text.
  104. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  105.                          % Bottom of page:
  106. \footskip 30pt           %    Distance from baseline of box containing foot 
  107.                          %    to baseline of last line of text.
  108.  
  109.  
  110. % DIMENSION OF TEXT:
  111. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  112. % The value of the multiplier was calculated as the floor of the
  113. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  114. % The old value of \textheight was 536.5pt.
  115. % \textheight is the height of text (including footnotes and figures, 
  116. % excluding running head and foot).
  117.  
  118. \textheight = 36\baselineskip
  119. \advance\textheight by \topskip
  120. \textwidth 5in           % Width of text line.
  121.                          % For two-column mode: 
  122. \columnsep 10pt          %    Space between columns 
  123. \columnseprule 0pt       %    Width of rule between columns.
  124.  
  125. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  126. % natural height instead of being stretched to exactly \textheight.
  127.  
  128. % FOOTNOTES:
  129.  
  130. \footnotesep 8.4pt    % Height of strut placed at the beginning of every
  131.                       % footnote = height of normal \footnotesize strut,
  132.                       % so no extra space between footnotes.
  133.  
  134. \skip\footins 10.8pt plus 4pt minus 2pt  % Space between last line of text and 
  135.                                          % top of first footnote.
  136.  
  137. % FLOATS: (a float is something like a figure or table)
  138. %
  139. %  FOR FLOATS ON A TEXT PAGE:
  140. %
  141. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  142. \floatsep 14pt plus 2pt minus 4pt        % Space between adjacent floats moved
  143.                                          % to top or bottom of text page.
  144. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  145.                                          % at top or bottom of page.
  146. \intextsep 14pt plus 4pt minus 4pt       % Space between in-text figures and 
  147.                                          % text.
  148. \@maxsep 20pt                            % The maximum of \floatsep, 
  149.                                          % \textfloatsep and \intextsep (minus
  150.                                          % the stretch and shrink).
  151. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  152. \dblfloatsep 14pt plus 2pt minus 4pt     % Same as \floatsep for double-column
  153.                                          % figures in two-column mode.
  154. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  155.                                          % floats.
  156. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  157.                                          % \dbltexfloatsep.
  158.  
  159. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  160. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  161. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  162.                          % 0pt plus ...)                                    
  163. \@fpsep 10pt plus 2fil    % Space between floats on float page/column.       
  164. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  165.                          % 0pt plus ... )                                   
  166.  
  167. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  168. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  169. \@dblfpsep 10pt plus 2fil % Space between floats on float page.
  170. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  171.                          % 0pt plus ... )                                   
  172. % MARGINAL NOTES:
  173. %
  174. \marginparpush 7pt       % Minimum vertical separation between two marginal 
  175.                          % notes.
  176.  
  177.  
  178. %  ****************************************
  179. %  *           PARAGRAPHING               *
  180. %  ****************************************
  181. %
  182. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  183. \parindent 1.5em                   % Width of paragraph indentation.
  184. %\topsep 10pt plus 4pt minus 6pt   % Extra vertical space, in addition to 
  185.                                    % \parskip, added above and below list and
  186.                                    % paragraphing environments.
  187. \partopsep 3pt plus 2pt minus 2pt  % Extra vertical space, in addition to 
  188.                                    % \parskip and \topsep, added when user
  189.                                    % leaves blank line before environment.
  190. %\itemsep 5pt plus 2.5pt minus 1pt % Extra vertical space, in addition to
  191.                                    % \parskip, added between list items.
  192. % See \@listI for values of \topsep and \itemsep
  193. % (Change made 9 Jun 87)
  194.  
  195. % The following page-breaking penalties are defined
  196.  
  197. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  198. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  199. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  200.  
  201. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  202. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  203. \@itempenalty     -\@lowpenalty    % Between list items.
  204.  
  205. % \clubpenalty         % 'Club line'  at bottom of page.
  206. % \widowpenalty        % 'Widow line' at top of page.
  207. % \displaywidowpenalty % Math display widow line.
  208. % \predisplaypenalty   % Breaking before a math display.
  209. % \postdisplaypenalty  % Breaking after a math display.
  210. % \interlinepenalty    % Breaking at a line within a paragraph.
  211. % \brokenpenalty       % Breaking after a hyphenated line.
  212.  
  213.  
  214. %    ****************************************
  215. %    *        CHAPTERS AND SECTIONS         *
  216. %    ****************************************
  217. %
  218. % Definition of \part moved to book.doc  19 Jan 88
  219.  
  220. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  221. %
  222.  
  223. \def\@makechapterhead#1{             % Heading for \chapter command
  224.   \vspace*{50pt}                     % Space at top of text page.
  225.   { \parindent 0pt \raggedright 
  226.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  227.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  228.       \par 
  229.       \vskip 20pt \fi                  % Space between number and title.
  230.     \Huge \bf                        % Title.
  231.     #1\par 
  232.     \nobreak                         % TeX penalty to prevent page break.
  233.     \vskip 40pt                      % Space between title and text.
  234.   } }
  235.  
  236. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  237. %
  238.  
  239. \def\@makeschapterhead#1{             % Heading for \chapter* command
  240.   \vspace*{50pt}                     % Space at top of page.
  241.   { \parindent 0pt \raggedright 
  242.     \Huge \bf                        % Title.
  243.     #1\par 
  244.     \nobreak                         % TeX penalty to prevent page break.
  245.     \vskip 40pt                      % Space between title and text.
  246.   } }
  247.  
  248. % \secdef{UNSTARCMDS}{STARCMDS} :
  249. %    When defining a \chapter or \section command without using
  250. %    \@startsection, you can use \secdef as follows:
  251. %       \def\chapter { ... \secdef \CMDA \CMDB }
  252. %       \def\CMDA    [#1]#2{ ...   % Command to define \chapter[...]{...}
  253. %       \def\CMDB    #1{ ...       % Command to define \chapter*{...}
  254.  
  255. \def\chapter{\cleardoublepage      % Starts new page.
  256.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  257.    \global\@topnum\z@        % Prevents figures from going at top of page.
  258.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  259.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  260.  
  261. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  262.         \refstepcounter{chapter}
  263.         \typeout{\@chapapp\space\thechapter.}
  264.         \addcontentsline{toc}{chapter}{\protect
  265.         \numberline{\thechapter}#1}\else
  266.       \addcontentsline{toc}{chapter}{#1}\fi
  267.    \chaptermark{#1}
  268.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  269.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  270.    \if@twocolumn                                 % Tests for two-column mode.  
  271.            \@topnewpage[\@makechapterhead{#2}]  
  272.      \else \@makechapterhead{#2}
  273.            \@afterheading                  % Routine called after chapter and
  274.      \fi}                                  % section heading.
  275.  
  276. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  277.         \else \@makeschapterhead{#1} 
  278.               \@afterheading\fi}
  279.  
  280. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  281. %            optional * [ALTHEADING]{HEADING}
  282. %    Generic command to start a section.  
  283. %    NAME       : e.g., 'subsection'
  284. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  285. %                 section = 2, etc.  A section number will be printed if
  286. %                 and only if LEVEL < or = the value of the secnumdepth
  287. %                 counter.
  288. %    INDENT     : Indentation of heading from left margin
  289. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  290. %                 If negative, then paragraph indent of text following 
  291. %                 heading is suppressed.
  292. %    AFTERSKIP  : if positive, then skip to leave below heading,
  293. %                       else - skip to leave to right of run-in heading.
  294. %    STYLE      : commands to set style
  295. %  If '*' missing, then increments the counter.  If it is present, then
  296. %  there should be no [ALTHEADING] argument.  A sectioning command
  297. %  is normally defined to \@startsection + its first six arguments.
  298.  
  299. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  300.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  301. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  302.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  303. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus 
  304.    -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  305. \def\paragraph{\@startsection
  306.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  307. \def\subparagraph{\@startsection
  308.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  309.      .2ex}{-1em}{\normalsize\bf}}
  310.  
  311. % Default initializations of \...mark commands.  (See below for their
  312. % us in defining page styles.
  313. %
  314.  
  315. \def\chaptermark#1{}
  316. % \def\sectionmark#1{}           % Preloaded definitions
  317. % \def\subsectionmark#1{}
  318. % \def\subsubsectionmark#1{}
  319. % \def\paragraphmark#1{}
  320. % \def\subparagraphmark#1{}
  321.  
  322. % The value of the counter secnumdepth gives the depth of the
  323. % highest-level sectioning command that is to produce section numbers.
  324. %
  325.  
  326. \setcounter{secnumdepth}{2}
  327.  
  328. % APPENDIX
  329. %
  330. % The \appendix command must do the following:
  331. %    -- reset the chapter counter to zero
  332. %    -- set \@chapapp to Appendix (for messages)
  333. %    -- redefine the chapter counter to produce appendix numbers
  334. %    -- reset the section counter to zero
  335. %    -- redefine the \chapter command if appendix titles and headings are
  336. %       to look different from chapter titles and headings.
  337.  
  338. \def\appendix{\par
  339.   \setcounter{chapter}{0}
  340.   \setcounter{section}{0}
  341.   \def\@chapapp{Appendix}
  342.   \def\thechapter{\Alph{chapter}}}
  343.  
  344.  
  345. %    ****************************************
  346. %    *                LISTS                 *
  347. %    ****************************************
  348. %
  349.  
  350. % The following commands are used to set the default values for the list
  351. % environment's parameters. See the LaTeX manual for an explanation of
  352. % the meanings of the parameters.  Defaults for the list environment are
  353. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  354. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  355. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  356. % called for a third-level list.)  By convention, \@listK should set
  357. % \leftmargin to \leftmarginK.
  358. %
  359. % For efficiency, level-one list's values are defined at top level, and
  360. % \@listi is defined to set only \leftmargin.
  361.  
  362. \leftmargini 2.5em
  363. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  364. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  365. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  366. \leftmarginv 1em
  367. \leftmarginvi 1em
  368.  
  369. \leftmargin\leftmargini
  370. \labelsep .5em
  371. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  372. %\parsep 5pt plus 2.5pt minus 1pt   %(Removed 9 Jun 87)
  373.  
  374. % \@listI defines top level and \@listi values of
  375. % \leftmargin, \topsep, \parsep, and \itemsep
  376. % (Added 9 Jun 87)
  377. \def\@listI{\leftmargin\leftmargini \parsep 5pt plus 2.5pt minus 1pt%
  378. \topsep 10pt plus 4pt minus 6pt%
  379. \itemsep 5pt plus 2.5pt minus 1pt}
  380.  
  381. \let\@listi\@listI
  382. \@listi 
  383.  
  384. \def\@listii{\leftmargin\leftmarginii
  385.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  386.    \topsep 5pt plus 2.5pt minus 1pt
  387.    \parsep 2.5pt plus 1pt minus 1pt
  388.    \itemsep \parsep}
  389.  
  390. \def\@listiii{\leftmargin\leftmarginiii
  391.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  392.     \topsep 2.5pt plus 1pt minus 1pt 
  393.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  394.     \itemsep \topsep}
  395.  
  396. \def\@listiv{\leftmargin\leftmarginiv
  397.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  398.  
  399. \def\@listv{\leftmargin\leftmarginv
  400.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  401.  
  402. \def\@listvi{\leftmargin\leftmarginvi
  403.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  404.  
  405.