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 / BK10.DOC < prev    next >
Text File  |  1992-03-19  |  18KB  |  417 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, the
  30. % document style defines \@normalsize instead of \normalsize .  This
  31. % is done only for \normalsize, not for any other size-changing
  32. % commands.
  33.  
  34. \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  35. \abovedisplayskip 10\p@ plus2\p@ minus5\p@
  36. \belowdisplayskip \abovedisplayskip
  37. \abovedisplayshortskip  \z@ plus3\p@   
  38. \belowdisplayshortskip  6\p@ plus3\p@ minus3\p@
  39. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  40.  
  41.  
  42. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  43. \abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
  44. \belowdisplayskip \abovedisplayskip
  45. \abovedisplayshortskip \z@ plus2\p@
  46. \belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
  47. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  48. \topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@
  49. \itemsep \parsep}}
  50.  
  51. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  52. \abovedisplayskip 6\p@ plus2\p@ minus4\p@
  53. \belowdisplayskip \abovedisplayskip
  54. \abovedisplayshortskip \z@ plus\p@
  55. \belowdisplayshortskip 3\p@ plus\p@ minus2\p@
  56. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  57. \topsep 3\p@ plus\p@ minus\p@\parsep 2\p@ plus\p@ minus\p@
  58. \itemsep \parsep}}
  59.  
  60. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  61. \def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
  62. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  63. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  64. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  65. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  66. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  67.  
  68. \normalsize  % Choose the normalsize font.
  69.  
  70.  
  71. %  ****************************************
  72. %  *            PAGE LAYOUT               *
  73. %  ****************************************
  74. %
  75. % All margin dimensions measured from a point one inch from top and side
  76. % of page.  
  77.  
  78. % SIDE MARGINS:
  79. \oddsidemargin .5in      % Left margin on odd-numbered pages.
  80. \evensidemargin 1.5in      % Left margin on even-numbered pages.
  81.  
  82. \marginparwidth .75in    %   Width of marginal notes.
  83. \marginparsep 7pt        % Horizontal space between outer margin and 
  84.                          % marginal note
  85.  
  86.  
  87. % VERTICAL SPACING:        
  88.                          % Top of page:
  89. \topmargin .75in         %    Nominal distance from top of page to top
  90.                          %    of box containing running head.
  91. \headheight 12pt         %    Height of box containing running head.
  92. \headsep   .25in         %    Space between running head and text.
  93. \topskip = 10pt          %    '\baselineskip' for first line of page.
  94.                          % Bottom of page:
  95. \footskip .35in          %    Distance from baseline of box containing
  96.                          %    foot to baseline of last line of text.
  97.  
  98.  
  99. % DIMENSION OF TEXT:
  100. % 24 Jun 86: changed to explicitly compute \textheight to avoid
  101. % roundoff.  The value of the multiplier was calculated as the floor
  102. % of the old \textheight minus \topskip, divided by \baselineskip for
  103. % \normalsize.  The old value of \textheight was 504pt.  \textheight
  104. % is the height of text (including footnotes and figures, excluding
  105. % running head and foot).
  106.  
  107. \textheight = 41\baselineskip
  108. \advance\textheight by \topskip
  109.  
  110. \textwidth 4.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 6.65pt   % 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 9pt plus 4pt minus 2pt  % Space between last line of text
  125.                                       % and top of first footnote.
  126.  
  127. % FLOATS: (a float is something like a figure or table)
  128. %
  129. %  FOR FLOATS ON A TEXT PAGE:
  130. %
  131. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  132. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats
  133.                                          % moved to top or bottom of
  134.                                          % text page.
  135. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and
  136.                                          % floats at top or bottom of
  137.                                          % page.
  138. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures
  139.                                          % and text.
  140. \@maxsep 20pt                            % The maximum of \floatsep, 
  141.                                          % \textfloatsep and \intextsep
  142.                                          % (minus the stretch and
  143.                                          % shrink).
  144. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  145. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for
  146.                                          % double-column figures in
  147.                                          % two-column mode.
  148. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for
  149.                                          % double-column  floats.
  150. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep
  151.                                          % and \dbltexfloatsep.
  152.  
  153. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  154. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  155. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must
  156.                          % be 0pt plus ...)
  157. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.
  158. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must
  159.                          % be 0pt plus ... )
  160.  
  161. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  162. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt
  163.                          % plus ...)
  164. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  165. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
  166.                          % 0pt plus ... )
  167. % MARGINAL NOTES:
  168. %
  169. \marginparpush 5pt       % Minimum vertical separation between two
  170.                          % marginal notes.
  171.  
  172.  
  173. %  ****************************************
  174. %  *           PARAGRAPHING               *
  175. %  ****************************************
  176. %
  177. \parskip 0pt plus 1pt              % Extra vertical space between
  178.                                    % paragraphs.
  179. \parindent 15pt                    % Width of paragraph indentation.
  180. %\topsep 8pt plus 2pt minus 4pt    % Extra vertical space, in addition
  181.                                    % to \parskip, added above and below
  182.                                    % list and paragraphing environments.
  183. \partopsep 2pt plus 1pt minus 1pt  % Extra vertical space, in addition
  184.                                    % to \parskip and \topsep, added when
  185.                                    % user leaves blank line before
  186.                                    % environment.
  187. %\itemsep 4pt plus 2pt minus 1pt   % Extra vertical space, in addition
  188.                                    % to \parskip, added between list
  189.                                    % items.
  190. % See \@listI for values of \topsep and \itemsep
  191. % (Change made 9 Jun 87)
  192.  
  193. % The following page-breaking penalties are defined
  194.  
  195. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  196. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  197. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  198.  
  199. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph
  200.                                    % environment.
  201. \@endparpenalty   -\@lowpenalty    % After a list or paragraph
  202.                                    % 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*{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 '\chaptername' 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 right-hand page.
  261.    \thispagestyle{plain}%     % Page style of chapter page is 'plain'
  262.    \global\@topnum\z@         % Prevents figures from going at
  263.                               % top of page.
  264.    \@afterindentfalse         % Suppresses indent in first paragraph.
  265.    \secdef\@chapter\@schapter}% Change to \@afterindenttrue to have
  266.                               % indent.
  267.  
  268. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  269.         \refstepcounter{chapter}%
  270.         \typeout{\@chapapp\space\thechapter.}%
  271.         \addcontentsline{toc}{chapter}{\protect
  272.         \numberline{\thechapter}#1}\else
  273.       \addcontentsline{toc}{chapter}{#1}\fi
  274.    \chaptermark{#1}%
  275.    \addtocontents{lof}%
  276.       {\protect\addvspace{10\p@}}% Adds between-chapter space to
  277.    \addtocontents{lot}%
  278.       {\protect\addvspace{10\p@}}%lists of figs & tables.
  279.    \if@twocolumn                 % Tests for two-column mode.  
  280.            \@topnewpage[\@makechapterhead{#2}]%
  281.      \else \@makechapterhead{#2}%
  282.            \@afterheading            % Routine called after chapter and
  283.      \fi}                            % section heading.
  284.  
  285. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]%
  286.         \else \@makeschapterhead{#1}%
  287.               \@afterheading\fi}
  288.  
  289. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  290. %            optional * [ALTHEADING]{HEADING}
  291. %    Generic command to start a section.  
  292. %    NAME       : e.g., 'subsection'
  293. %    LEVEL      : a number, denoting depth of section -- e.g.,
  294. %                 chapter=1, section = 2, etc.  A section number will be
  295. %                 printed if and only if LEVEL < or = the value of the
  296. %                 secnumdepth counter.
  297. %    INDENT     : Indentation of heading from left margin
  298. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  299. %                 If negative, then paragraph indent of text following 
  300. %                 heading is suppressed.
  301. %    AFTERSKIP  : if positive, then skip to leave below heading,
  302. %                       else - skip to leave to right of run-in heading.
  303. %    STYLE      : commands to set style
  304. %  If '*' missing, then increments the counter.  If it is present, then
  305. %  there should be no [ALTHEADING] argument.  A sectioning command
  306. %  is normally defined to \@startsection + its first six arguments.
  307.  
  308. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus
  309.     -.2ex}{2.3ex plus.2ex}{\reset@font\Large\bf}}
  310. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex
  311.     minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\bf}}
  312. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  313.     -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bf}}
  314. \def\paragraph{\@startsection
  315.     {paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}{\reset@font
  316.     \normalsize\bf}}
  317. \def\subparagraph{\@startsection
  318.     {subparagraph}{4}{\parindent}{3.25ex plus1ex minus
  319.      .2ex}{-1em}{\reset@font\normalsize\bf}}
  320.  
  321.  
  322. % Default initializations of \...mark commands.  (See below for their
  323. % us in defining page styles.
  324. %
  325.  
  326. \def\chaptermark#1{}
  327. % \def\sectionmark#1{}           % Preloaded definitions
  328. % \def\subsectionmark#1{}
  329. % \def\subsubsectionmark#1{}
  330. % \def\paragraphmark#1{}
  331. % \def\subparagraphmark#1{}
  332.  
  333. % The value of the counter secnumdepth gives the depth of the
  334. % highest-level sectioning command that is to produce section numbers.
  335. %
  336.  
  337. \setcounter{secnumdepth}{2}
  338.  
  339. % APPENDIX
  340. %
  341. % The \appendix command must do the following:
  342. %    -- reset the chapter counter to zero
  343. %    -- set \@chapapp to Appendix (for messages)
  344. %    -- redefine the chapter counter to produce appendix numbers
  345. %    -- reset the section counter to zero
  346. %    -- redefine the \chapter command if appendix titles and headings
  347. %       are to look different from chapter titles and headings.
  348.  
  349. \def\appendix{\par
  350.   \setcounter{chapter}{0}%
  351.   \setcounter{section}{0}%
  352.   \def\@chapapp{\appendixname}%
  353.   \def\thechapter{\Alph{chapter}}}
  354.  
  355.  
  356. %    ****************************************
  357. %    *                LISTS                 *
  358. %    ****************************************
  359. %
  360.  
  361. % The following commands are used to set the default values for the list
  362. % environment's parameters. See the LaTeX manual for an explanation of
  363. % the meanings of the parameters.  Defaults for the list environment are
  364. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  365. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  366. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  367. % called for a third-level list.)  By convention, \@listK should set
  368. % \leftmargin to \leftmarginK.
  369. %
  370. % For efficiency, level-one list's values are defined at top level, and
  371. % \@listi is defined to set only \leftmargin.
  372.  
  373. \leftmargini 25pt
  374. \leftmarginii 22pt     % > \labelsep + width of '(m)'
  375. \leftmarginiii 18.7pt  % > \labelsep + width of 'vii.'
  376. \leftmarginiv 17pt     % > \labelsep + width of 'M.'
  377. \leftmarginv 10pt
  378. \leftmarginvi 10pt
  379.  
  380. \leftmargin\leftmargini
  381. \labelsep 5pt
  382. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  383. % \parsep 4pt plus 2pt minus 1pt (Removed 9 Jun 87)
  384.  
  385. % \@listI defines top level and \@listi values of
  386. % \leftmargin, \topsep, \parsep, and \itemsep
  387. % (Added 9 Jun 87)
  388. \def\@listI{\leftmargin\leftmargini \parsep 4\p@ plus2\p@ minus\p@
  389. \topsep 8\p@ plus2\p@ minus4\p@
  390. \itemsep 4\p@ plus2\p@ minus\p@}
  391.  
  392. \let\@listi\@listI
  393. \@listi 
  394.  
  395. \def\@listii{\leftmargin\leftmarginii
  396.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  397.    \topsep 4\p@ plus2\p@ minus\p@
  398.    \parsep 2\p@ plus\p@ minus\p@
  399.    \itemsep \parsep}
  400.  
  401. \def\@listiii{\leftmargin\leftmarginiii
  402.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  403.     \topsep 2\p@ plus\p@ minus\p@ 
  404.     \parsep \z@ \partopsep \p@ plus\z@ minus\p@
  405.     \itemsep \topsep}
  406.  
  407. \def\@listiv{\leftmargin\leftmarginiv
  408.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  409.  
  410. \def\@listv{\leftmargin\leftmarginv
  411.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  412.  
  413. \def\@listvi{\leftmargin\leftmarginvi
  414.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  415.  
  416. \endinput
  417.