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