home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / tex / inputs.sit / TeX-inputs / bk10.doc < prev    next >
Text File  |  1989-09-18  |  17KB  |  409 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{12pt}\xpt\@xpt
  45. \abovedisplayskip 10pt plus2pt minus5pt%
  46. \belowdisplayskip \abovedisplayskip
  47. \abovedisplayshortskip  \z@ plus3pt%   
  48. \belowdisplayshortskip  6pt plus3pt minus3pt%
  49. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  50.  
  51.  
  52. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  53. \abovedisplayskip 8.5pt plus 3pt minus 4pt%
  54. \belowdisplayskip \abovedisplayskip
  55. \abovedisplayshortskip \z@ plus2pt%
  56. \belowdisplayshortskip 4pt plus2pt minus 2pt
  57. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  58. \topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  59. \itemsep \parsep}}
  60.  
  61. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  62. \abovedisplayskip 6pt plus 2pt minus 4pt%
  63. \belowdisplayskip \abovedisplayskip
  64. \abovedisplayshortskip \z@ plus 1pt%
  65. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  66. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  67. \topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  68. \itemsep \parsep}}
  69.  
  70. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  71. \def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
  72. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  73. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  74. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  75. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  76. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  77.  
  78. \normalsize  % Choose the normalsize font.
  79.  
  80.  
  81. %  ****************************************
  82. %  *            PAGE LAYOUT               *
  83. %  ****************************************
  84. %
  85. % All margin dimensions measured from a point one inch from top and side
  86. % of page.  
  87.  
  88. % SIDE MARGINS:
  89. \oddsidemargin .5in      % Left margin on odd-numbered pages.
  90. \evensidemargin 1.5in      % Left margin on even-numbered pages.
  91.  
  92. \marginparwidth .75in    %   Width of marginal notes.
  93. \marginparsep 7pt        % Horizontal space between outer margin and 
  94.                          % marginal note
  95.  
  96.  
  97. % VERTICAL SPACING:        
  98.                          % Top of page:
  99. \topmargin .75in         %    Nominal distance from top of page to top of
  100.                          %    box containing running head.
  101. \headheight 12pt         %    Height of box containing running head.
  102. \headsep   .25in         %    Space between running head and text.
  103. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  104.                          % Bottom of page:
  105. \footskip .35in          %    Distance from baseline of box containing foot 
  106.                          %    to baseline of last line of text.
  107.  
  108.  
  109. % DIMENSION OF TEXT:
  110. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  111. % The value of the multiplier was calculated as the floor of the
  112. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  113. % The old value of \textheight was 504pt.
  114. % \textheight is the height of text (including footnotes and figures, 
  115. % excluding running head and foot).
  116.  
  117. \textheight = 41\baselineskip
  118. \advance\textheight by \topskip
  119.  
  120. \textwidth 4.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 6.65pt   % 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 9pt 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 12pt plus 2pt minus 2pt        % 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 12pt plus 2pt minus 2pt       % 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 12pt plus 2pt minus 2pt     % 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 8pt 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 8pt 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 5pt       % 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 15pt                    % Width of paragraph indentation.
  184. %\topsep 8pt plus 2pt minus 4pt    % Extra vertical space, in addition to 
  185.                                    % \parskip, added above and below list and
  186.                                    % paragraphing environments.
  187. \partopsep 2pt plus 1pt minus 1pt  % Extra vertical space, in addition to 
  188.                                    % \parskip and \topsep, added when user
  189.                                    % leaves blank line before environment.
  190. %\itemsep 4pt plus 2pt 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. %
  219.  
  220. % Definition of \part moved to book.doc  19 Jan 88
  221.  
  222. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  223. %
  224.  
  225. \def\@makechapterhead#1{             % Heading for \chapter command
  226.   \vspace*{50pt}                     % Space at top of text page.
  227.   { \parindent 0pt \raggedright 
  228.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  229.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  230.     \par 
  231.     \vskip 20pt \fi                    % Space between number and title.
  232.     \Huge \bf                        % Title.
  233.     #1\par 
  234.     \nobreak                         % TeX penalty to prevent page break.
  235.     \vskip 40pt                      % Space between title and text.
  236.   } }
  237.  
  238. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  239. %
  240.  
  241. \def\@makeschapterhead#1{             % Heading for \chapter* command
  242.   \vspace*{50pt}                     % Space at top of page.
  243.   { \parindent 0pt \raggedright 
  244.     \Huge \bf                        % Title.
  245.     #1\par 
  246.     \nobreak                         % TeX penalty to prevent page break.
  247.     \vskip 40pt                      % Space between title and text.
  248.   } }
  249.  
  250. % \secdef{UNSTARCMDS}{STARCMDS} :
  251. %    When defining a \chapter or \section command without using
  252. %    \@startsection, you can use \secdef as follows:
  253. %       \def\chapter { ... \secdef \CMDA \CMDB }
  254. %       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
  255. %       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
  256.  
  257. \def\chapter{\cleardoublepage % Starts new right-hand page.
  258.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  259.    \global\@topnum\z@        % Prevents figures from going at top of page.
  260.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  261.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  262.  
  263. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  264.         \refstepcounter{chapter}
  265.         \typeout{\@chapapp\space\thechapter.}
  266.         \addcontentsline{toc}{chapter}{\protect
  267.         \numberline{\thechapter}#1}\else
  268.       \addcontentsline{toc}{chapter}{#1}\fi
  269.    \chaptermark{#1}
  270.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  271.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  272.    \if@twocolumn                                 % Tests for two-column mode.  
  273.            \@topnewpage[\@makechapterhead{#2}]  
  274.      \else \@makechapterhead{#2}
  275.            \@afterheading                  % Routine called after chapter and
  276.      \fi}                                  % section heading.
  277.  
  278. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  279.         \else \@makeschapterhead{#1} 
  280.               \@afterheading\fi}
  281.  
  282. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  283. %            optional * [ALTHEADING]{HEADING}
  284. %    Generic command to start a section.  
  285. %    NAME       : e.g., 'subsection'
  286. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  287. %                 section = 2, etc.  A section number will be printed if
  288. %                 and only if LEVEL < or = the value of the secnumdepth
  289. %                 counter.
  290. %    INDENT     : Indentation of heading from left margin
  291. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  292. %                 If negative, then paragraph indent of text following 
  293. %                 heading is suppressed.
  294. %    AFTERSKIP  : if positive, then skip to leave below heading,
  295. %                       else - skip to leave to right of run-in heading.
  296. %    STYLE      : commands to set style
  297. %  If '*' missing, then increments the counter.  If it is present, then
  298. %  there should be no [ALTHEADING] argument.  A sectioning command
  299. %  is normally defined to \@startsection + its first six arguments.
  300.  
  301. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  302.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  303. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  304.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  305. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  306. -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  307. \def\paragraph{\@startsection
  308.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  309. \def\subparagraph{\@startsection
  310.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  311.      .2ex}{-1em}{\normalsize\bf}}
  312.  
  313.  
  314. % Default initializations of \...mark commands.  (See below for their
  315. % us in defining page styles.
  316. %
  317.  
  318. \def\chaptermark#1{}
  319. % \def\sectionmark#1{}           % Preloaded definitions
  320. % \def\subsectionmark#1{}
  321. % \def\subsubsectionmark#1{}
  322. % \def\paragraphmark#1{}
  323. % \def\subparagraphmark#1{}
  324.  
  325. % The value of the counter secnumdepth gives the depth of the
  326. % highest-level sectioning command that is to produce section numbers.
  327. %
  328.  
  329. \setcounter{secnumdepth}{2}
  330.  
  331. % APPENDIX
  332. %
  333. % The \appendix command must do the following:
  334. %    -- reset the chapter counter to zero
  335. %    -- set \@chapapp to Appendix (for messages)
  336. %    -- redefine the chapter counter to produce appendix numbers
  337. %    -- reset the section counter to zero
  338. %    -- redefine the \chapter command if appendix titles and headings are
  339. %       to look different from chapter titles and headings.
  340.  
  341. \def\appendix{\par
  342.   \setcounter{chapter}{0}
  343.   \setcounter{section}{0}
  344.   \def\@chapapp{Appendix}
  345.   \def\thechapter{\Alph{chapter}}}
  346.  
  347.  
  348. %    ****************************************
  349. %    *                LISTS                 *
  350. %    ****************************************
  351. %
  352.  
  353. % The following commands are used to set the default values for the list
  354. % environment's parameters. See the LaTeX manual for an explanation of
  355. % the meanings of the parameters.  Defaults for the list environment are
  356. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  357. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  358. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  359. % called for a third-level list.)  By convention, \@listK should set
  360. % \leftmargin to \leftmarginK.
  361. %
  362. % For efficiency, level-one list's values are defined at top level, and
  363. % \@listi is defined to set only \leftmargin.
  364.  
  365. \leftmargini 25pt
  366. \leftmarginii 22pt     % > \labelsep + width of '(m)'
  367. \leftmarginiii 18.7pt  % > \labelsep + width of 'vii.'
  368. \leftmarginiv 17pt     % > \labelsep + width of 'M.'
  369. \leftmarginv 10pt
  370. \leftmarginvi 10pt
  371.  
  372. \leftmargin\leftmargini
  373. \labelsep 5pt
  374. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  375. % \parsep 4pt plus 2pt minus 1pt (Removed 9 Jun 87)
  376.  
  377. % \@listI defines top level and \@listi values of
  378. % \leftmargin, \topsep, \parsep, and \itemsep
  379. % (Added 9 Jun 87)
  380. \def\@listI{\leftmargin\leftmargini \parsep 4pt plus 2pt minus 1pt%
  381. \topsep 8pt plus 2pt minus 4pt%
  382. \itemsep 4pt plus 2pt minus 1pt}
  383.  
  384. \let\@listi\@listI
  385. \@listi 
  386.  
  387. \def\@listii{\leftmargin\leftmarginii
  388.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  389.    \topsep 4pt plus 2pt minus 1pt
  390.    \parsep 2pt plus 1pt minus 1pt
  391.    \itemsep \parsep}
  392.  
  393. \def\@listiii{\leftmargin\leftmarginiii
  394.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  395.     \topsep 2pt plus 1pt minus 1pt 
  396.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  397.     \itemsep \topsep}
  398.  
  399. \def\@listiv{\leftmargin\leftmarginiv
  400.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  401.  
  402. \def\@listv{\leftmargin\leftmarginv
  403.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  404.  
  405. \def\@listvi{\leftmargin\leftmarginvi
  406.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  407.  
  408.