home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / emtex04.zip / LATEXDOC.ZIP / EMTEX / TEXINPUT / BK12.DOC < prev    next >
Text File  |  1992-03-19  |  18KB  |  415 lines

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