home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / inputs / latex / unpacked / letter.dtx < prev    next >
Encoding:
Text File  |  1995-06-21  |  60.6 KB  |  1,898 lines

  1. % \iffalse meta-comment
  2. %
  3. % Copyright 1993-1995 the LaTeX3 project and any individual authors
  4. % listed elsewhere in this file.  All rights reserved.
  5. % For further copyright information see the file legal.txt, and any
  6. % other copyright notices in this file.
  7. % This file is part of the LaTeX2e system.
  8. % ----------------------------------------
  9. %   This system is distributed in the hope that it will be useful,
  10. %   but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. %   For error reports concerning UNCHANGED versions of this file no more
  13. %   than one year old, see bugs.txt.
  14. %   Please do not request updates from us directly.  Primary
  15. %   distribution is through the CTAN archives.
  16. % IMPORTANT COPYRIGHT NOTICE:
  17. % You are NOT ALLOWED to distribute this file alone.
  18. % You are allowed to distribute this file under the condition that it is
  19. % distributed together with all the files listed in manifest.txt.
  20. % If you receive only some of these files from someone, complain!
  21. % Permission is granted to copy this file to another file with a clearly
  22. % different name and to customize the declarations in that copy to serve
  23. % the needs of your installation, provided that you comply with
  24. % the conditions in the file legal.txt.
  25. % However, NO PERMISSION is granted to produce or to distribute a
  26. % modified version of this file under its original name.
  27. %  
  28. % You are NOT ALLOWED to change this file.
  29. % \fi
  30. %
  31. % \CheckSum{984}
  32. %% \CharacterTable
  33. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  34. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  35. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  36. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  37. %%   Dollar        \$     Percent       \%     Ampersand     \&
  38. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  39. %%   Asterisk      \*     Plus          \+     Comma         \,
  40. %%   Minus         \-     Point         \.     Solidus       \/
  41. %%   Colon         \:     Semicolon     \;     Less than     \<
  42. %%   Equals        \=     Greater than  \>     Question mark \?
  43. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  44. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  45. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  46. %%   Right brace   \}     Tilde         \~}
  47. %
  48. % \iffalse
  49. % \section{Identification}
  50. %
  51. %
  52. %    This document class can only be used with \LaTeXe, so we make
  53. %    sure that an appropriate message is displayed when another \TeX{}
  54. %    format is used.
  55. %    \begin{macrocode}
  56. %<+letter>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
  57. %    \end{macrocode}
  58. %
  59. %    Announce the Class name and its version.
  60. %    \begin{macrocode}
  61. %<+letter>\ProvidesClass{letter}
  62. %<*driver>
  63.        \ProvidesFile{letter.drv}
  64. %</driver>
  65.               [1995/05/25 v1.2s
  66. %<+letter>               Standard LaTeX document class]
  67. %    \end{macrocode}
  68. %
  69. % \section{The documentation driver file}
  70. %
  71. %    We have our own document class to format the \LaTeXe
  72. %    documentation.
  73. % \fi
  74. % \changes{v1.0.6}{1993/12/07}{Use class ltxdoc document class}
  75. % \iffalse
  76. %    \begin{macrocode}
  77. %<*driver>
  78. ]
  79. \documentclass{ltxdoc}
  80. %    \end{macrocode}
  81. %
  82. %    We don't want everything to appear in the index.
  83. %    \begin{macrocode}
  84. \DoNotIndex{\@Alph,\@alph,\@arabic,\@badmath}
  85. \DoNotIndex{\@centercr}
  86. \DoNotIndex{\@empty,\@ignoretrue}
  87. \DoNotIndex{\@ixpt}
  88. \DoNotIndex{\@M,\@minus,\@ne,\@plus}
  89. \DoNotIndex{\\,\addtolength}
  90. \DoNotIndex{\advance}
  91. \DoNotIndex{\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
  92. \DoNotIndex{\bullet}
  93. \DoNotIndex{\cdot,\cr,\day,\DeclareOption}
  94. \DoNotIndex{\def,\DocInput,\documentclass}
  95. \DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist}
  96. \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
  97. \DoNotIndex{\endlist,\everycr,\ExecuteOptions}
  98. \DoNotIndex{\filedate,\filename,\fileversion}
  99. \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
  100. \DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi}
  101. \DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input}
  102. \DoNotIndex{\kern,\leavevmode,\let,\leftmark}
  103. \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
  104. \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
  105. \DoNotIndex{\NeedsTeXFormat,\newdimen}
  106. \DoNotIndex{\newpage,\nobreak,\noindent,\number}
  107. \DoNotIndex{\p@}
  108. \DoNotIndex{\pagestyle,\par}
  109. \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
  110. \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
  111. \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
  112. \DoNotIndex{\rightmargin,\rlap,\rmfamily}
  113. \DoNotIndex{\setbox,\setcounter,\setlength}
  114. \DoNotIndex{\skip,\slshape,\space}
  115. \DoNotIndex{\trivlist,\typeout,\tw@}
  116. \DoNotIndex{\vskip,\vspace,\year,\z@}
  117. %
  118. \CodelineNumbered
  119. \CodelineIndex
  120. \EnableCrossrefs
  121. \RecordChanges
  122. %    \end{macrocode}
  123. %    We use so many \file{docstrip} modules that we set the
  124. %    \texttt{StandardModuleDepth} counter to 1.
  125. %    \begin{macrocode}
  126. \setcounter{StandardModuleDepth}{1}
  127. %    \end{macrocode}
  128. %    The following command retrieves the date and version information
  129. %    from the file.
  130. %    \begin{macrocode}
  131. \GetFileInfo{letter.drv}
  132. %    \end{macrocode}
  133. %    Some commonly used abbreviations
  134. %    \begin{macrocode}
  135. \newcommand*{\Lopt}[1]{\textsf {#1}}
  136. \newcommand*{\file}[1]{\texttt {#1}}
  137. \newcommand*{\Lcount}[1]{\textsl {\small#1}}
  138. \newcommand*{\pstyle}[1]{\textsl {#1}}
  139. %    \end{macrocode}
  140. %    We also want the full details.
  141. %    \begin{macrocode}
  142. \begin{document}
  143. \DocInput{letter.dtx}
  144. \PrintIndex
  145. % ^^A\PrintChanges
  146. \end{document}
  147. %</driver>
  148. %    \end{macrocode}
  149. % \fi
  150. %
  151. % \changes{v1.1}{1993/12/18}{Changes to make it work with
  152. %    compatibility mode.}
  153. % \changes{v1.1a}{1993/12/19}{Removed float parms}
  154. %
  155. % \changes{v1.1c}{1994/01/17}{Moved definition of \cs{@textop} to
  156. %    initialization section, to counteract setting of \cs{@texttop} in
  157. %    \cs{raggedbottom}.}
  158. %
  159. % \changes{v1.1d}{1994/01/20}{Corrected margins: Now computed from
  160. %    \cs{paperwidth} and \cs{textwidth}, so that the text is
  161. %    horizontally centered.}
  162. % \changes{v1.1e}{1994/02/03}{Corrected checksum}
  163. %
  164. % \changes{v1.2a}{1994/02/12}{Removed onecolumn and twocolumn options.}
  165. % \changes{v1.2a}{1994/02/12}{Changed label producing commands in .aux
  166. %    file.}
  167. %
  168. % \changes{v1.2b}{1994/02/28}{Moved driver further up.}
  169. %
  170. % \changes{v1.2c}{1994/03/08}{Always write .aux file.}
  171. % \changes{v1.2f}{1994/04/29}{Use LaTeX instead of LaTeX2e in messages}
  172. % \changes{v1.2f}{1994/04/29}{Removed \cs{typeout} message}
  173. % \changes{v1.2g}{1994/05/01}{Removed the use of \cs{fileversion}
  174. %    c.s.}
  175. % \changes{v1.2j}{1994/06/01}{Corrected driver code.}
  176. % \changes{v1.2k}{1994/06/17}{Various documentation enhancements}
  177. % \changes{v1.2p}{1994/12/11}{Use \cs{newcommand*} to define
  178. %    user-level commands that take an argument}
  179. % \changes{v1.2q}{1995/05/17}{cleaned up \cs{changes entries}}
  180. % \changes{v1.2q}{1995/05/18}{replaced \cs{hbox to} by \cs{hb@xt@}}
  181. % \changes{v1.2r}{1995/05/23}{removed a superfluous brace}
  182. %
  183. % \iffalse
  184. % Copyright (C) 1994 LaTeX3 project, Frank Mittelbach
  185. % and Rainer Sch\"opf, all rights reserved.
  186. % \fi
  187. %
  188. % \author{Leslie Lamport and Frank Mittelbach and Rainer Sch\"opf}
  189. %
  190. % \title{Standard Letter Document Class for \LaTeX{} version 2e}
  191. %
  192. %
  193. % \maketitle
  194. % \tableofcontents
  195. %
  196. % \StopEventually
  197. %
  198. %
  199. % \section{Initial Code}
  200. %
  201. %    In this part we define a few commands that are used later on.
  202. %
  203. % \begin{macro}{\@ptsize}
  204. %    This control sequence is used to store the second digit of the
  205. %    pointsize we are typesetting in. So, normally, it's value is one
  206. %    of 0, 1 or 2.
  207. %    \begin{macrocode}
  208. %<*letter>
  209. \newcommand\@ptsize{}
  210. %    \end{macrocode}
  211. % \end{macro}
  212. %
  213. %
  214. %
  215. % \subsection{Setting Paper Sizes}
  216. %
  217. %    The variables |\paperwidth| and |\paperheight| should reflect the
  218. %    physical paper size after trimming. For desk printer output this
  219. %    is usually the real paper size since there is no post-processing.
  220. % \changes{v1.0a}{1993/12/14}{Corrected typo, A4 is not 279 mm high}
  221. %    \begin{macrocode}
  222. \DeclareOption{a4paper}
  223.    {\setlength\paperheight {297mm}%
  224.     \setlength\paperwidth  {210mm}}
  225. \DeclareOption{a5paper}
  226.    {\setlength\paperheight {210mm}%
  227.     \setlength\paperwidth  {148mm}}
  228. \DeclareOption{b5paper}
  229.    {\setlength\paperheight {250mm}%
  230.     \setlength\paperwidth  {176mm}}
  231. \DeclareOption{letterpaper}
  232.    {\setlength\paperheight {11in}%
  233.     \setlength\paperwidth  {8.5in}}
  234. \DeclareOption{legalpaper}
  235.    {\setlength\paperheight {14in}%
  236.     \setlength\paperwidth  {8.5in}}
  237. \DeclareOption{executivepaper}
  238.    {\setlength\paperheight {10.5in}%
  239.     \setlength\paperwidth  {7.25in}}
  240. %    \end{macrocode}
  241. %
  242. % \changes{v1.2o}{1994/08/26}{Added the option \textsf{landscape}}
  243. %    The option \Lopt{landscape} switches the values of |\paperheight|
  244. %    and |\paperwidth|, assuming the dimensions wer given for portrait
  245. %    paper.
  246. %    \begin{macrocode}
  247. \DeclareOption{landscape}
  248.    {\setlength\@tempdima   {\paperheight}%
  249.     \setlength\paperheight {\paperwidth}%
  250.     \setlength\paperwidth  {\@tempdima}}
  251. %    \end{macrocode}
  252. %
  253. % \subsection{Choosing the type size}
  254. %
  255. %    The type size options are handled by defining |\@ptsize| to
  256. %    contain the last digit of the size in question and branching on
  257. %    |\ifcase| statements. This is done for historical reasons to stay
  258. %    compatible with other packages that use the |\@ptsize| variable
  259. %    to select special actions. It makes the declarations of size
  260. %    options less than 10pt difficult, although one can probably use
  261. %    \texttt{9} and \texttt{8} assuming that a class wont define both
  262. %    \Lopt{8pt} and \Lopt{18pt} options.
  263. %
  264. %    \begin{macrocode}
  265. \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
  266. \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
  267. \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
  268. %    \end{macrocode}
  269. %
  270. %
  271. %  \subsection{Two-side or one-side printing}
  272. %
  273. %    Two-sided printing was not supported in the \LaTeX~2.09 version
  274. %    of this document class.
  275. % \changes{v1.2e}{1994/04/28}{Added oneside option and twoside option
  276. %    in native mode}
  277. %    \begin{macrocode}
  278. \if@compatibility
  279.   \DeclareOption{twoside}{\@latexerr{No `twoside' layout for letters}%
  280.                                    \@eha}
  281. \else
  282.   \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
  283. \fi
  284. %    \end{macrocode}
  285. %
  286. %
  287. %    \begin{macrocode}
  288. \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
  289. %    \end{macrocode}
  290. %
  291. %  \subsection{Draft option}
  292. %
  293. %    If the user requests \Lopt{draft} we show any overfull boxes.
  294. %    We could probably add some more interesting stuff to this option.
  295. %    \begin{macrocode}
  296. \DeclareOption{draft}{\setlength\overfullrule{5pt}}
  297. \DeclareOption{final}{\setlength\overfullrule{0pt}}
  298. %    \end{macrocode}
  299. %
  300. %
  301. %  \subsection{Equation numbering on the left}
  302. %
  303. %    The option \Lopt{leqno} can be used to get the equation numbers
  304. %    on the left side of the equation.
  305. % \changes{v1.1c}{1994/01/17}{Option leqno now read from
  306. %    \file{leqno.clo}.}
  307. %    \begin{macrocode}
  308. \DeclareOption{leqno}{\input{leqno.clo}}
  309. %    \end{macrocode}
  310. %
  311. %  \subsection{Flush left displays}
  312. %
  313. %    The option \Lopt{fleqn} redefines the displayed math environments
  314. %    in such a way that they come out flush left, with an indentation
  315. %    of |\mathindent| from the prevailing left margin.
  316. % \changes{v1.1}{1993/12/18}{Corrected typo in \cs{renewcommand},
  317. %    doubled hash marks.}
  318. % \changes{v1.1c}{1994/01/17}{Option fleqn now read from
  319. %    \file{fleqn.clo}.}
  320. %    \begin{macrocode}
  321. \DeclareOption{fleqn}{\input{fleqn.clo}}
  322. %    \end{macrocode}
  323. %
  324. %
  325. % \section{Executing Options}
  326. %
  327. %    Here we execute the default options to initialize certain
  328. %    variables.
  329. % \changes{v1.2e}{1994/04/28}{Added execution of `oneside' option}
  330. %    \begin{macrocode}
  331. \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final}
  332. %    \end{macrocode}
  333. %
  334. %    The |\ProcessOptions| command causes the execution of the code
  335. %    for every option \Lopt{foo} which is declared and for which the
  336. %    user typed the \Lopt{foo} option in his |\documentclass| command.
  337. %    For every option \Lopt{bar} he typed, which is not declared, the
  338. %    option is assumed to be a global option.  All options will be
  339. %    passed as document options to any |\usepackage| command in the
  340. %    document preamble.
  341. %    \begin{macrocode}
  342. \ProcessOptions
  343. %    \end{macrocode}
  344. %    Now that all the options have been executed we can load the
  345. %    chosen class option file that contains all size dependant code.
  346. %    \begin{macrocode}
  347. \input{size1\@ptsize.clo}
  348. %    \end{macrocode}
  349. %
  350. %
  351. %  \section{Loading Packages}
  352. %
  353. %  The standard class files do not load additional packages.
  354. %
  355. %
  356. % \section{Document Layout}
  357. % \label{sec:maincode}
  358. %
  359. %  In this section we are finally dealing with the nasty typographical
  360. %  details.
  361. %
  362. % \subsection{Paragraphing}
  363. %
  364. % \begin{macro}{\lineskip}
  365. % \begin{macro}{\normallineskip}
  366. %    These parameters control \TeX's behavior when two lines tend to
  367. %    come too close together.
  368. %    \begin{macrocode}
  369. \setlength\lineskip{1\p@}
  370. \setlength\normallineskip{1\p@}
  371. %    \end{macrocode}
  372. % \end{macro}
  373. % \end{macro}
  374. %
  375. % \begin{macro}{\baselinestretch}
  376. %    This is used as a multiplier for |\baselineskip|. The default is
  377. %    to {\em not\/} stretch the baselines.
  378. %    \begin{macrocode}
  379. \renewcommand\baselinestretch{}
  380. %    \end{macrocode}
  381. % \end{macro}
  382. %
  383. % \begin{macro}{\parskip}
  384. % \begin{macro}{\parindent}
  385. %    |\parskip| gives extra vertical space between paragraphs and
  386. %    |\parindent| is the width of the paragraph indentation.
  387. %    Letters are typeset without paragraph indentation.
  388. %    \begin{macrocode}
  389. \setlength\parskip{0.7em}
  390. \setlength\parindent{0\p@}
  391. %    \end{macrocode}
  392. % \end{macro}
  393. % \end{macro}
  394. %
  395. % \begin{macro}{\@lowpenalty}
  396. % \begin{macro}{\@medpenalty}
  397. % \begin{macro}{\@highpenalty}
  398. %    The commands |\nopagebreak| and |\nolinebreak| put in penalties
  399. %    to discourage these breaks at the point they are put in.
  400. %    They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
  401. %    dependant on their argument.
  402. %    \begin{macrocode}
  403. \@lowpenalty   51
  404. \@medpenalty  151
  405. \@highpenalty 301
  406. %    \end{macrocode}
  407. % \end{macro}
  408. % \end{macro}
  409. % \end{macro}
  410. %
  411. % \begin{macro}{\clubpenalty}
  412. % \begin{macro}{\widowpenalty}
  413. %    These penalties are used to discourage club and widow lines.
  414. %    Because we use their default values we only show them here,
  415. %    commented out.
  416. %    \begin{macrocode}
  417. % \clubpenalty  150
  418. % \widowpenalty 150
  419. %    \end{macrocode}
  420. % \end{macro}
  421. % \end{macro}
  422. %
  423. % \begin{macro}{\displaywidowpenalty}
  424. % \begin{macro}{\predisplaypenalty}
  425. % \begin{macro}{\postdisplaypenalty}
  426. %    Discourage (but not so much) widows in front of a math display
  427. %    and forbid breaking directly in front of a display. Allow break
  428. %    after a display without a penalty. Again the default values are
  429. %    used, therefore we only show them here.
  430. %    \begin{macrocode}
  431. % \displaywidowpenalty 50
  432. % \predisplaypenalty   10000
  433. % \postdisplaypenalty  0
  434. %    \end{macrocode}
  435. % \end{macro}
  436. % \end{macro}
  437. % \end{macro}
  438. %
  439. % \begin{macro}{\interlinepenalty}
  440. %    Allow the breaking of a page in the middle of a paragraph.
  441. %    \begin{macrocode}
  442. % \interlinepenalty 0
  443. %    \end{macrocode}
  444. % \end{macro}
  445. %
  446. %
  447. % \begin{macro}{\brokenpenalty}
  448. %    We allow the breaking of a page after a hyphenated line.
  449. %    \begin{macrocode}
  450. % \brokenpenalty 0
  451. %    \end{macrocode}
  452. % \end{macro}
  453. %
  454. %
  455. % \subsection{Page Layout}
  456. %
  457. %    All margin dimensions are measured from a point one inch from the
  458. %    top and lefthand side of the page.
  459. %
  460. % \subsubsection{Vertical spacing}
  461. %
  462. % \begin{macro}{\headheight}
  463. % \begin{macro}{\headsep}
  464. %    The |\headheight| is the height of the box that will contain the
  465. %    running head. The |\headsep| is the distance between the bottom
  466. %    of the running head and the top of the text. |\topskip| is the
  467. %    |\baselineskip| for the first line on a page, its value depends
  468. %    on the size option that was specified. Therefore it is
  469. %    initialized in one of the \file{size1x.clo} files.
  470. %    \begin{macrocode}
  471. \setlength\headheight{12\p@}
  472. \setlength\headsep   {45\p@}
  473. %    \end{macrocode}
  474. % \end{macro}
  475. % \end{macro}
  476. %
  477. % \begin{macro}{\footskip}
  478. %    The distance from the baseline of the box which contains the
  479. %    running footer to the baseline of last line of text is controlled
  480. %    by the |\footskip|.
  481. %    Bottom of page:
  482. %    \begin{macrocode}
  483. \setlength\footskip{25\p@}
  484. %    \end{macrocode}
  485. % \end{macro}
  486. %
  487. % \changes{v1.2n}{1994/07/13}{Setting of \cs{maxdepth} and
  488. %    \cs{@maxdepth} already happens in the size.. files, removed
  489. %    here}
  490. %
  491. % \subsubsection{The dimension of text}
  492. %
  493. % \begin{macro}{\textwidth}
  494. %    When we are in compatibility mode we have to make sure that the
  495. %    dimensions of the printed area are not different from what the
  496. %    user was used to see.
  497. %
  498. % \changes{v1.2n}{1994/07/13}{Setting \cs{textwidth} to a fixed value
  499. %    should only happen in compatibility mode}
  500. %    \begin{macrocode}
  501. \if@compatibility
  502.   \setlength\textwidth{365\p@}
  503. %    \end{macrocode}
  504. % \end{macro}
  505. %
  506. % \begin{macro}{\textheight}
  507. %    Now that we have computed the width of the text, we have to take
  508. %    care of the height. The |\textheight| is the height of text
  509. %    (including footnotes and figures, excluding running head and
  510. %    foot).
  511. % \changes{v1.2n}{1994/07/13}{Setting \cs{textheight} to a fixed value
  512. %    should only happen in compatibility mode}
  513. %    \begin{macrocode}
  514.   \setlength\textheight{505\p@}
  515. \fi
  516. %    \end{macrocode}
  517. %    In native mode we use the dimensions as they were computed by one
  518. %    of the \Lopt{xxpt} options, together with one of the
  519. %    \Lopt{..paper} options.
  520. % \end{macro}
  521. %
  522. % \subsubsection{Margins}
  523. %
  524. % \begin{macro}{\oddsidemargin}
  525. % \begin{macro}{\evensidemargin}
  526. % \begin{macro}{\marginparwidth}
  527. % \changes{v1.1d}{1994/01/20}{Corrected margins: Now computed from
  528. %    \cs{paperwidth} and \cs{textwidth}.}  The values of
  529. %    |\oddsidemargin| and |\evensidemargin| are computed from those of
  530. %    |\paperwidth| and |\textwidth|.
  531. % \changes{v1.2n}{1994/07/13}{Added fixed values for these parameters
  532. %    in compatibillity mode}
  533. %    \begin{macrocode}
  534. \if@compatibility
  535.   \setlength\oddsidemargin{53pt}
  536.   \setlength\evensidemargin{53pt}
  537.   \setlength\marginparwidth{90pt}
  538. \else
  539.   \setlength\@tempdima{\paperwidth}
  540.   \addtolength\@tempdima{-2in}
  541.   \addtolength\@tempdima{-\textwidth}
  542.   \setlength\oddsidemargin   {.5\@tempdima}
  543.   \setlength\evensidemargin  {\oddsidemargin}
  544.   \setlength\marginparwidth  {90\p@}
  545. \fi
  546. %    \end{macrocode}
  547. % \end{macro}
  548. % \end{macro}
  549. % \end{macro}
  550. %
  551. % \begin{macro}{\marginparsep}
  552. % \begin{macro}{\marginparpush}
  553. %    The horizontal space between the main text and marginal notes is
  554. %    determined by |\marginparsep|, the minimum vertical separation
  555. %    between two marginal notes is controlled by |\marginparpush|.
  556. %    \begin{macrocode}
  557. \setlength\marginparsep {11\p@}
  558. \setlength\marginparpush{5\p@}
  559. %    \end{macrocode}
  560. % \end{macro}
  561. % \end{macro}
  562. %
  563. % \begin{macro}{\topmargin}
  564. %    The |\topmargin| is the distance between the top of `the
  565. %    printable area' --which is 1 inch below the top of the paper--
  566. %    and the top of the box which contains the running head.
  567. %
  568. %    It can now be computed from the values set above.
  569. %    \begin{macrocode}
  570. \setlength\topmargin{27pt}
  571. %    \end{macrocode}
  572. % \end{macro}
  573. %
  574. %
  575. % \subsubsection{Footnotes}
  576. %
  577. % \begin{macro}{\footnotesep}
  578. %    |\footnotesep| is the height of the strut placed at the beginning
  579. %    of every footnote. It equals the  height of a normal
  580. %    |\footnotesize| strut in this
  581. %    class, thus no extra space occurs between footnotes.
  582. %    \begin{macrocode}
  583. \setlength\footnotesep{12\p@}
  584. %    \end{macrocode}
  585. % \end{macro}
  586. %
  587. % \begin{macro}{\footins}
  588. %    |\skip\footins| is the space between the last line of the main
  589. %    text and the top of the first footnote.
  590. %    \begin{macrocode}
  591. \setlength{\skip\footins}{10\p@ \@plus 2\p@ \@minus 4\p@}
  592. %    \end{macrocode}
  593. % \end{macro}
  594. %
  595. %
  596. % \subsection{Page Styles}
  597. %
  598. %    The page style \pstyle{foo} is defined by defining the command
  599. %    |\ps@foo|.   This command should make only local definitions.
  600. %    There should be no stray spaces in the definition, since they
  601. %    could lead to mysterious extra spaces in the output (well, that's
  602. %    something that should be always avoided).
  603. %
  604. % \begin{macro}{\@evenhead}
  605. % \begin{macro}{\@oddhead}
  606. % \begin{macro}{\@evenfoot}
  607. % \begin{macro}{\@oddfoot}
  608. %    The |\ps@...| command defines the macros |\@oddhead|,
  609. %    |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
  610. %    heads and feet---e.g., |\@oddhead| is the macro to produce the
  611. %    contents of the heading box for odd-numbered pages.  It is called
  612. %    inside an |\hbox| of width |\textwidth|.
  613. % \end{macro}
  614. % \end{macro}
  615. % \end{macro}
  616. % \end{macro}
  617. %
  618. % \subsubsection{Marking conventions}
  619. %
  620. %    To make headings determined by the sectioning commands, the page
  621. %    style defines the commands |\chaptermark|, |\sectionmark|,
  622. %    \ldots, where |\chaptermark{|\meta{text}|}| is called by
  623. %    |\chapter| to set a mark, and so on.
  624. %
  625. %    The |\...mark| commands and the |\...head| macros are defined
  626. %    with the help of the following macros.  (All the |\...mark|
  627. %    commands should be initialized to no-ops.)
  628. %
  629. %    \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
  630. %    of marks, a `left' and a `right' mark, using the following
  631. %    commands:
  632. %    \begin{flushleft}
  633. %     |\markboth{|\meta{left}|}{|\meta{right}|}|: Adds both marks.
  634. %
  635. %     |\markright{|\meta{right}|}|: Adds a `right' mark.
  636. %
  637. %     |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
  638. %                  or |\@evenfoot| macros, it gets the current `left'
  639. %                  mark.  |\leftmark| works like \TeX's |\botmark|
  640. %                  command.
  641. %
  642. %     |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
  643. %                   or  |\@evenfoot| macros, it gets the current
  644. %                   `right' mark. |\rightmark| works like \TeX's
  645. %                   |\firstmark| command.
  646. %    \end{flushleft}
  647. %
  648. %    The marking commands work reasonably well for right marks
  649. %    `numbered within' left marks--e.g., the left mark is changed by a
  650. %    |\chapter| command and the right mark is changed by a |\section|
  651. %    command.  However, it does produce somewhat anomalous results if
  652. %    two |\markboth|'s occur on the same page.
  653. %
  654. %
  655. %    Commands like |\tableofcontents| that should set the marks in some
  656. %    page styles use a |\@mkboth| command, which is |\let| by the
  657. %    pagestyle command (|\ps@...|)  to |\markboth| for setting the
  658. %    heading or to |\@gobbletwo| to do nothing.
  659. %
  660. %
  661. %    \begin{macrocode}
  662. % %%%\mark{{}{}}   % Initializes TeX's marks   <--- can vanish
  663. %    \end{macrocode}
  664. %
  665. % \subsubsection{Defining the page styles}
  666. % \label{sec:pagestyle}
  667. %
  668. %    The pagestyles \pstyle{empty} and \pstyle{plain} are defined in
  669. %    \file{latex.tex}.
  670. %
  671. % \begin{macro}{\ps@headings}
  672. %    The definition of the page style \pstyle{headings} has to be
  673. %    different for two sided printing than it is for one sided
  674. %    printing.
  675. %
  676. % \changes{v1.2e}{1994/04/28}{Added twoside support}
  677. %    \begin{macrocode}
  678. \if@twoside
  679.   \def\ps@headings{%
  680. %    \end{macrocode}
  681. %    The running feet are empty in this page style.
  682. %    \begin{macrocode}
  683.       \let\@oddfoot\@empty\let\@evenfoot\@empty
  684. %    \end{macrocode}
  685. %    The running head contains some information about this letter. The
  686. %    head is the same for even and odd pages.
  687. % \changes{v1.2i}{1994/05/12}{Made running heads the same on odd and
  688. %    even pages}
  689. % \changes{v1.2k}{1994/06/17}{Added a missing brace}
  690. %    \begin{macrocode}
  691.       \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
  692.                     \hfil \@date
  693.                     \hfil \pagename{} \thepage}%
  694.       \let\@evenhead\@oddhead}
  695. %    \end{macrocode}
  696. %    For one sided printing we don't need to define |\@evenhead| so
  697. %    the definition is somewhat simpler.
  698. %    \begin{macrocode}
  699. \else
  700.   \def\ps@headings{%
  701.       \let\@oddfoot\@empty
  702.       \def\@oddhead{\slshape\headtoname{} \ignorespaces\toname
  703.                     \hfil \@date
  704.                     \hfil \pagename{} \thepage}}
  705. \fi
  706. %    \end{macrocode}
  707. % \end{macro}
  708. %
  709. %
  710. % \begin{macro}{\ps@empty}
  711. %    The definition of the page style \pstyle{empty} is simple:
  712. %    No running head or foot at all.
  713. % \changes{v1.2e}{1994/04/28}{Also make even feet and head empty}
  714. %    \begin{macrocode}
  715. \def\ps@empty{%
  716.       \let\@oddfoot\@empty\let\@oddhead\@empty
  717.       \let\@evenfoot\@empty\let\@evenhead\@empty}
  718. %    \end{macrocode}
  719. % \end{macro}
  720. %
  721. % \begin{macro}{\ps@firstpage}
  722. %    The page style \pstyle{firstpage} puts the telephone number
  723. %    in the proper place for the letterhead. It should be adapted
  724. %    to site conventions. The size of the number is determined
  725. %    depending on the main size.
  726. %    \begin{macrocode}
  727. \def\ps@firstpage{%
  728.      \let\@oddhead\@empty
  729.      \def\@oddfoot{\raisebox{-45\p@}[\z@]{%
  730.         \hb@xt@\textwidth{\hspace*{100\p@}%
  731.           \ifcase \@ptsize\relax
  732.              \normalsize
  733.           \or
  734.              \small
  735.           \or
  736.              \footnotesize
  737.           \fi
  738.         \fromlocation \hfill \telephonenum}}\hss}}
  739. %    \end{macrocode}
  740. % \end{macro}
  741. %
  742. % \begin{macro}{\ps@plain}
  743. %    The definition of the page style \pstyle{plain} is again simple.
  744. % \changes{v1.2e}{1994/04/28}{Added definition of \cs{@evenfoot}
  745. %    because of twoside option}
  746. % \changes{v1.2s}{1995/05/25}{replace \cs{rmfamily} with
  747. %    \cs{normalfont} (PR 1578)}
  748. %    \begin{macrocode}
  749. \def\ps@plain{%
  750.       \let\@oddhead\@empty
  751.       \def\@oddfoot{\normalfont\hfil\thepage\hfil}%
  752.       \def\@evenfoot{\normalfont\hfil\thepage\hfil}}
  753. %    \end{macrocode}
  754. % \end{macro}
  755. %
  756. %
  757. %
  758. % \section{Document Markup}
  759. %
  760. % \subsection{Global Declarations}
  761. %
  762. % \begin{macro}{\name}
  763. % \begin{macro}{\signature}
  764. % \begin{macro}{\address}
  765. % \begin{macro}{\location}
  766. % \begin{macro}{\telephone}
  767. % The following declarations, shown with examples, give information
  768. % about the sender:
  769. % \begin{itemize}
  770. %   \item |\name{Dr. L. User}| : to be used for the return address on
  771. %          the envelope.
  772. %    \begin{macrocode}
  773. \newcommand*{\name}[1]{\def\fromname{#1}}
  774. %    \end{macrocode}
  775. %   \item |\signature{Larry User}| : goes after the closing.
  776. %    \begin{macrocode}
  777. \newcommand*{\signature}[1]{\def\fromsig{#1}}
  778. %    \end{macrocode}
  779. %   \item |\address{3245 Foo St.\\Gnu York}| : used as the return
  780. %          address in the
  781. %          letter and on the envelope.  If not declared, then an
  782. %          institutional standard address is used.
  783. %    \begin{macrocode}
  784. \newcommand*{\address}[1]{\def\fromaddress{#1}}
  785. %    \end{macrocode}
  786. %   \item |\location{Room 374}| : Acts as modifier to the standard
  787. %          institutional address.
  788. %    \begin{macrocode}
  789. \newcommand*{\location}[1]{\def\fromlocation{#1}}
  790. %    \end{macrocode}
  791. %   \item |\telephone{(415)123-4567}| : Just in case some style puts it
  792. %          on the letter.
  793. % \changes{v1.2m}{1994/06/23}{Removed typo (\#[] instead of [1])}
  794. %    \begin{macrocode}
  795. \newcommand*{\telephone}[1]{\def\telephonenum{#1}}
  796. %    \end{macrocode}
  797. % \end{itemize}
  798. % \end{macro}
  799. % \end{macro}
  800. % \end{macro}
  801. % \end{macro}
  802. % \end{macro}
  803. %
  804. % \begin{macro}{\fromname}
  805. % \begin{macro}{\fromsig}
  806. % \begin{macro}{\fromaddress}
  807. % \begin{macro}{\fromlocation}
  808. % \begin{macro}{\telephonenum}
  809. %    We make sure that the internal control sequences that are used to
  810. %    store the information exist and are empty.
  811. %    \begin{macrocode}
  812. \name{}
  813. \signature{}
  814. \address{}
  815. \location{}
  816. \telephone{}
  817. %    \end{macrocode}
  818. % \end{macro}
  819. % \end{macro}
  820. % \end{macro}
  821. % \end{macro}
  822. % \end{macro}
  823. %
  824. % \begin{macro}{\makelabels}
  825. %     The |\makelabels| declaration causes mailing labels to be made.
  826. %    \begin{macrocode}
  827. \newcommand*{\makelabels}{%
  828. %    \end{macrocode}
  829. %    At the beginning of the document, we need to activate the
  830. %    |\@mlabel| and |\@startlabels| commands, as well as  write
  831. %    |\@startlabels| to the |.aux| file.
  832. %    \begin{macrocode}
  833.   \AtBeginDocument{%
  834.      \let\@startlabels\startlabels
  835.      \let\@mlabel\mlabel
  836.      \if@filesw
  837.        \immediate\write\@mainaux{\string\@startlabels}\fi}%
  838. %    \end{macrocode}
  839. %    At the end of the document we need to write |\clearpage| to the
  840. %    |.aux| file.
  841. %    \begin{macrocode}
  842.   \AtEndDocument{%
  843.      \if@filesw\immediate\write\@mainaux{\string\clearpage}\fi}}
  844. %    \end{macrocode}
  845. %    |\makelabels| is allowed only before the |\begin{document}|
  846. %    command.
  847. %    \begin{macrocode}
  848. \@onlypreamble\makelabels
  849. %    \end{macrocode}
  850. % \end{macro}
  851. %
  852. % \subsection{The generic letter commands}
  853. %
  854. % \begin{environment}{letter}
  855. %     The letter environment creates a new letter, starting from page 1.
  856. %     (The first page is unnumbered.)  It has a single argument, which
  857. %     is the addressee and his address, as in
  858. %\begin{verbatim}
  859. %  \begin{letter}{Sam Jones \\
  860. %                 Institute for Retarded Study\\
  861. %                 Princeton, N.J.}
  862. %\end{verbatim}
  863. %     Local declarations, such as |\address|, can follow the
  864. %     |\begin{letter}|.
  865. % \changes{v1.2e}{1994/04/28}{When printing twosided a new letter
  866. %    shouldn't start on the back of the previous one. Added insertion
  867. %    of a blank page when necessary.}
  868. %    \begin{macrocode}
  869. \newenvironment{letter}[1]
  870.   {\newpage
  871.     \if@twoside \ifodd\c@page
  872.                 \else\thispagestyle{empty} \hbox{}\newpage\fi
  873.     \fi
  874.     \c@page\@ne
  875.     \interlinepenalty=200 % smaller than the TeXbook value
  876. %    \end{macrocode}
  877. %    The |\leavevmode| and |\ignorespaces| commands are there for
  878. %    protecting against an empty argument.
  879. %    \begin{macrocode}
  880.     \@processto{\leavevmode\ignorespaces #1}}
  881. %    \end{macrocode}
  882. %    The end of the environment possibly writes the address
  883. %    information on the \file{.aux} file.
  884. % \changes{v1.2p}{1994/12/11}{No longer redefine \cs{protect} but use
  885. %    one of the available settings}
  886. %    \begin{macrocode}
  887.   {\stopletter\@@par\pagebreak\@@par
  888.     \if@filesw
  889.       \begingroup
  890.         \let\\=\relax
  891.         \let\protect\@unexpandable@protect
  892.         \immediate\write\@auxout{%
  893.           \string\@mlabel{\returnaddress}{\toname\\\toaddress}}%
  894.       \endgroup
  895.     \fi}
  896. %    \end{macrocode}
  897. % \end{environment}
  898. %
  899. %
  900. % \begin{macro}{\@processto}
  901. % \begin{macro}{\@xproc}
  902. % \begin{macro}{\@yproc}
  903. %    |\@processto| gets the |\toname| and |\toaddress| from the letter
  904. %    environment's macro argument. |\@xproc| and |\@yproc| are auxiliary
  905. %    macros.
  906. %    \begin{macrocode}
  907. \long\def\@processto#1{\@xproc #1\\@@@\ifx\toaddress\@empty
  908.     \else \@yproc #1@@@\fi}
  909. \long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
  910. \long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
  911. %    \end{macrocode}
  912. % \end{macro}
  913. % \end{macro}
  914. % \end{macro}
  915. %
  916. %
  917. % \subsubsection{Page breaking control}
  918. %
  919. % \begin{macro}{\stopbreaks}
  920. %    When the command |\stopbreaks| is issued no page breaks should
  921. %    occur until |\startbreaks| is called.
  922. %    \begin{macrocode}
  923. \newcommand*{\stopbreaks}{\interlinepenalty \@M
  924.    \def\par{\@@par\nobreak}\let\\=\@nobreakcr
  925.    \let\vspace\@nobreakvspace}
  926. %    \end{macrocode}
  927. % \end{macro}
  928. %
  929. % \begin{macro}{\nobreakvspace}
  930. % \begin{macro}{\nobreakvspacex}
  931. % \begin{macro}{\nobreakcr}
  932. %    These are needed by |\stopbreaks|
  933. %    \begin{macrocode}
  934. \def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
  935.  
  936. \def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
  937.                \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
  938.  
  939. \def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
  940. %    \end{macrocode}
  941. % \end{macro}
  942. % \end{macro}
  943. % \end{macro}
  944. %
  945. % \begin{macro}{\startbreaks}
  946. %    This cancels the effect of |\stopbreaks|.
  947. %    \begin{macrocode}
  948. \newcommand*{\startbreaks}{\let\\=\@normalcr
  949.    \interlinepenalty 200\def\par{\@@par\penalty 200\relax}}
  950. %    \end{macrocode}
  951. % \end{macro}
  952. %
  953. %
  954. % \begin{macro}{\longindentation}
  955. %    The size of the indent to use before the closing of the letter.
  956. %    \begin{macrocode}
  957. \newdimen\longindentation
  958. \longindentation=.5\textwidth
  959. %    \end{macrocode}
  960. % \end{macro}
  961. %
  962. % \begin{macro}{\indentedwidth}
  963. %    The width of the closing of the letter.
  964. %    \begin{macrocode}
  965. \newdimen\indentedwidth
  966. \indentedwidth=\textwidth
  967. \advance\indentedwidth -\longindentation
  968. %    \end{macrocode}
  969. % \end{macro}
  970. %
  971. % \begin{macro}{\opening}
  972. %     Text is begun with the |\opening| command, whose argument
  973. %     generates the salutation, as in
  974. %\begin{verbatim}
  975. %      \opening{Dear Henry,}
  976. %\end{verbatim}
  977. %    This should produce everything up to and including the `Dear Henry,'
  978. %    and a \par command that follows. Since there's a |\vfil| at the
  979. %    bottom of every page, it can add vertical fill to position a short
  980. %    letter. It should use the following commands:
  981. %   \begin{itemize}
  982. %   \item |\toname| : name part of `to' address.
  983. %                     Will be one line long. 
  984. %   \item |\toaddress| : address part of `to' address.
  985. %                        The lines separated by |\\|.
  986. %   \item |\fromname| : name of sender.
  987. %   \item |\fromaddress| : argument of current |\address|
  988. %     declaration-- null if none.  Should use standard institutional
  989. %     address if null. 
  990. %   \item |\fromlocation| : argument of current |\location|
  991. %     declaration--null if none.
  992. %   \item |\telephonenum| : argument of current |\telephone|
  993. %     declaration--null if none.
  994. %    \end{itemize}
  995. %    \begin{macrocode}
  996. \newcommand*{\opening}[1]{\ifx\@empty\fromaddress
  997.   \thispagestyle{firstpage}%
  998.     {\raggedleft\@date\par}%
  999.   \else  % home address
  1000.     \thispagestyle{empty}%
  1001.     {\raggedleft\begin{tabular}{l}\ignorespaces
  1002.       \fromaddress \\*[2\parskip]%
  1003.       \@date \end{tabular}\par}%
  1004.   \fi
  1005.   \vspace{2\parskip}%
  1006.   {\raggedright \toname \\ \toaddress \par}%
  1007.   \vspace{2\parskip}%
  1008.   #1\par\nobreak}
  1009. %    \end{macrocode}
  1010. % \end{macro}
  1011. %
  1012. % \begin{macro}{\closing}
  1013. %     The body of the letter follows, ended by a |\closing| command,
  1014. %     as in
  1015. %\begin{verbatim}
  1016. %            \closing{Yours truly,}
  1017. %\end{verbatim}
  1018. %     This command generates the closing matter, and the signature.
  1019. %     An obvious thing to do is to use a |\parbox| for the closing
  1020. %     and the signature.  Should use the following:
  1021. %    \begin{itemize}
  1022. %      \item |\fromsig| : argument of current |\signature| declaration
  1023. %                   or, if null, the |\fromname|.
  1024. %      \item |\stopbreaks| : a macro that inhibits page breaking.
  1025. %    \end{itemize}
  1026. %    \begin{macrocode}
  1027. \newcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
  1028.   \stopbreaks
  1029.   \noindent
  1030.   \ifx\@empty\fromaddress\else
  1031.   \hspace*{\longindentation}\fi
  1032.   \parbox{\indentedwidth}{\raggedright
  1033.        \ignorespaces #1\\[6\medskipamount]%
  1034.        \ifx\@empty\fromsig
  1035.            \fromname
  1036.        \else \fromsig \fi\strut}%
  1037.    \par}
  1038. %    \end{macrocode}
  1039. % \end{macro}
  1040. %
  1041. % \begin{macro}{\smallskipamount}
  1042. % \begin{macro}{\mdeskipamount}
  1043. % \begin{macro}{\bigskipamount}
  1044. %   Of these three, only |\medskipmount| is actually used above.
  1045. %    \begin{macrocode}
  1046. %\smallskipamount=.5\parskip
  1047. \medskipamount=\parskip
  1048. %\bigskipamount=2\parskip
  1049. %    \end{macrocode}
  1050. % \end{macro}
  1051. % \end{macro}
  1052. % \end{macro}
  1053. %
  1054. % \begin{macro}{\cc}
  1055. % \begin{macro}{\encl}
  1056. % \begin{macro}{\ps}
  1057. %    After the |\closing| you can put arbitrary stuff, which is typeset
  1058. %    with zero |\parindent| and no page breaking.  Commands designed
  1059. %    for use after the closing are:
  1060. %    \begin{verbatim}
  1061. %  \cc{Tinker\\Evers\\Chance}
  1062. %\end{verbatim}
  1063. %    which produces:\\
  1064. %    \begin{tabular}{ll}
  1065. %        cc: & Tinker\\
  1066. %            & Evers\\
  1067. %            & Chance
  1068. %    \end{tabular}\\
  1069. %    Note the obvious use of |\parbox|.
  1070. % \changes{v1.2s}{1995/05/25}{replace \cs{reset@font} with
  1071. %    \cs{normalfont}; remove \cs{rm}}
  1072. %    \begin{macrocode}
  1073. \newcommand*{\cc}[1]{%
  1074.   \par\noindent
  1075.   \parbox[t]{\textwidth}{%
  1076.     \@hangfrom{\normalfont\ccname: }%
  1077.     \ignorespaces #1\strut}\par}
  1078. %    \end{macrocode}
  1079. %\begin{verbatim}
  1080. %  \encl{Foo(2)\\Bar}
  1081. %\end{verbatim}
  1082. %    which produces:\\
  1083. %    \begin{tabular}{ll}
  1084. %        encl: & Foo(2)\\
  1085. %              & Bar
  1086. %    \end{tabular}
  1087. %    \begin{macrocode}
  1088. \newcommand*{\encl}[1]{%
  1089.   \par\noindent
  1090.   \parbox[t]{\textwidth}{%
  1091.     \@hangfrom{\normalfont\enclname: }%
  1092.     \ignorespaces #1\strut}\par}
  1093. %    \end{macrocode}
  1094. %
  1095. %    The only thing |\ps| needs to do is call |\startbreaks|,
  1096. %        which allows page breaking again.
  1097. %    \begin{macrocode}
  1098. \newcommand*{\ps}{\par\startbreaks}
  1099. %    \end{macrocode}
  1100. % \end{macro}
  1101. % \end{macro}
  1102. % \end{macro}
  1103. %
  1104. %
  1105. % \begin{macro}{\stopletter}
  1106. %     The |\stopletter| command is called by |\endletter| to do the
  1107. %     following:
  1108. %    \begin{itemize}
  1109. %     \item Add any desired  fill  or other material at the end of the
  1110. %       letter.
  1111. %     \item Define |\returnaddress| to be the return address for the
  1112. %       mailing
  1113. %      label.  More precisely, it is the first argument of the |\mlabel|
  1114. %       command described below. It should be defined to null if the
  1115. %       return address doesn't appear on the labels.  Any command,
  1116. %       other than |\\|, that should not be expanded until the |\mlabel|
  1117. %       command is actually executed must be preceded by |\protect|.
  1118. %       Whenever possible, |\protect| commands in the definition of
  1119. %       |\returnaddress|---it's much more efficient that way.  In
  1120. %       particular, when the standard return address is used, you
  1121. %       should define |\returnaddress| to something like
  1122. %       |\protect\standardreturnaddress|.
  1123. %    \end{itemize}
  1124. %    \begin{macrocode}
  1125. \newcommand*{\stopletter}{}
  1126. %    \end{macrocode}
  1127. % \end{macro}
  1128. %
  1129. % \subsection{Customizing the labels}
  1130. %
  1131. %    Commands for generating the labels are put on the \file{.aux} file,
  1132. %    which is read in and processed by the |\end{document}| command.
  1133. %    You have to define the following two commands:
  1134. %    \begin{itemize}
  1135. %    \item |\startlabels| : Should reset the page layout parameters if
  1136. %      necessary. 
  1137. %    \item |\mlabel\marg{return address}\marg{to adress}| : Command to
  1138. %      generate a single label.
  1139. %    \end{itemize}
  1140. %
  1141. %     
  1142. %
  1143. % \begin{macro}{\returnaddress}
  1144. %    The return address for the mailing labels can be stored in this
  1145. %    macro.
  1146. %    \begin{macrocode}
  1147. \newcommand*{\returnaddress}{}
  1148. %    \end{macrocode}
  1149. % \end{macro}
  1150. %
  1151. % \begin{macro}{\labelcount}
  1152. %    A register to count the labels 
  1153. %    \begin{macrocode}
  1154. \newcount\labelcount
  1155. %    \end{macrocode}
  1156. % \end{macro}
  1157. %
  1158. % \begin{macro}{\startlabels}
  1159. %     The following |\startlabels| command sets things up for
  1160. %     producing labels in two columns of five 2" $\times$ 4-1/4"
  1161. %     labels each, suitable for reproducing onto Avery brand number
  1162. %     5352 address labels.
  1163. % \changes{v1.2q}{1995/03/14}{changed value of \cs{columnsep} by 1pt}
  1164. %    \begin{macrocode}
  1165. \newcommand*{\startlabels}{\labelcount\z@
  1166.   \pagestyle{empty}%
  1167.   \let\@texttop\relax
  1168.   \topmargin -50\p@
  1169.   \headsep \z@
  1170.   \oddsidemargin -35\p@
  1171.   \evensidemargin -35\p@
  1172.   \textheight 10in
  1173.   \@colht\textheight  \@colroom\textheight \vsize\textheight
  1174.   \textwidth 550\p@
  1175.   \columnsep 26\p@
  1176.   \ifcase \@ptsize\relax
  1177.     \normalsize
  1178.   \or
  1179.     \small
  1180.   \or
  1181.     \footnotesize
  1182.   \fi
  1183.   \baselineskip \z@
  1184.   \lineskip \z@
  1185.   \boxmaxdepth \z@
  1186.   \parindent \z@
  1187.   \twocolumn\relax}
  1188. %    \end{macrocode}
  1189. % \end{macro}
  1190. %
  1191. % \begin{macro}{\@startlabels}
  1192. %    |\@startlabels| is the command name that is written to the |.aux|
  1193. %    file. It is a no-op at first, and defined to be the same as
  1194. %    |\startlabels| in the |\begin{document}| hook.
  1195. %    \begin{macrocode}
  1196. \let\@startlabels=\relax
  1197. %    \end{macrocode}
  1198. % \end{macro}
  1199. %
  1200. % \begin{macro}{\mlabel}
  1201. %    This command prints an address label; it is used when the user
  1202. %    specified |\makelabels| in the preamble of his document. The
  1203. %    command |\mlabel| takes two arguments; the second argument is
  1204. %    supposed to be the address; the first argument can be used to
  1205. %    print a return address. In this document class we ignore the
  1206. %    first argument. Also the labels are supposed to be 2~inch high
  1207. %    and 3.6~inch wide. When your address labels have a different you
  1208. %    will have to defined your own |\mlabel| command.
  1209. % \changes{v1.2p}{1994/12/11}{Redefined \cs{mlabel} to not use the
  1210. %    \cs{setbox} primitive}
  1211. % \changes{v1.2q}{1995/03/14}{changed width of the labels slightly to
  1212. %    prevent \LaTeX\ stuffing two on each line}
  1213. %    \begin{macrocode}
  1214. \newcommand*{\mlabel}[2]{%
  1215.   \parbox[b][2in][c]{262\p@}{\strut\ignorespaces #2}%
  1216.   }
  1217. %    \end{macrocode}
  1218. % \end{macro}
  1219. %
  1220. % \begin{macro}{\@mlabel}
  1221. %    |\@mlabel| is written to the \file{.aux} file in place of |\mlabel|.
  1222. %    That allows to define it as a no-op per default, and activate it
  1223. %    in the |\begin{document}| hook.
  1224. %    \begin{macrocode}
  1225. \let\@mlabel=\@gobbletwo
  1226. %    \end{macrocode}
  1227. % \end{macro}
  1228. %
  1229. %
  1230. % \subsection{Lists}
  1231. %
  1232. % \subsubsection{General List Parameters}
  1233. %
  1234. %    The following commands are used to set the default values for the
  1235. %    list environment's parameters. See the \LaTeX{} manual for an
  1236. %    explanation of the meanings of the parameters.  Defaults for the
  1237. %    list environment are set as follows.  First, |\rightmargin|,
  1238. %    |\listparindent| and |\itemindent| are set to 0pt.  Then, for a
  1239. %    \texttt{K}th level list, the command |\@listK| is called, where
  1240. %    `\texttt{K}' denotes `\texttt{i}', `\texttt{ii}', ... ,
  1241. %    `\texttt{vi}'.  (I.e., |\@listiii| is called for a third-level
  1242. %    list.)  By convention, |\@listK| should set |\leftmargin| to
  1243. %    |\leftmarginK|.
  1244. %
  1245. % \begin{macro}{\leftmargin}
  1246. % \begin{macro}{\leftmargini}
  1247. % \begin{macro}{\leftmarginii}
  1248. % \begin{macro}{\leftmarginiii}
  1249. % \begin{macro}{\leftmarginiv}
  1250. % \begin{macro}{\leftmarginv}
  1251. % \begin{macro}{\leftmarginvi}
  1252. % For efficiency, level-one list's values are defined at top level, and
  1253. % |\@listi| is defined to set only |\leftmargin|.
  1254. %    \begin{macrocode}
  1255. \setlength\leftmargini  {2.5em}
  1256. %    \end{macrocode}
  1257. %    The following three are calculated so  that they are larger than
  1258. %    the sum of |\labelsep| and the width of the default labels (which
  1259. %    are `(m)', `vii.' and `M.').
  1260. %    \begin{macrocode}
  1261. \setlength\leftmarginii  {2.2em}
  1262. \setlength\leftmarginiii {1.87em}
  1263. \setlength\leftmarginiv  {1.7em}
  1264. \setlength\leftmarginv  {1em}
  1265. \setlength\leftmarginvi {1em}
  1266. %    \end{macrocode}
  1267. %    Here we set the top level leftmargin.
  1268. %    \begin{macrocode}
  1269. \setlength\leftmargin    {\leftmargini}
  1270. %    \end{macrocode}
  1271. % \end{macro}
  1272. % \end{macro}
  1273. % \end{macro}
  1274. % \end{macro}
  1275. % \end{macro}
  1276. % \end{macro}
  1277. % \end{macro}
  1278. %
  1279. % \begin{macro}{\labelsep}
  1280. % \begin{macro}{\labelwidth}
  1281. %    |\labelsep| is the distance between the label and the text of an
  1282. %    item; |\labelwidth| is the width of the label.
  1283. %    \begin{macrocode}
  1284. \setlength  \labelsep  {5\p@}
  1285. \setlength  \labelwidth{\leftmargini}
  1286. \addtolength\labelwidth{-\labelsep}
  1287. %    \end{macrocode}
  1288. % \end{macro}
  1289. % \end{macro}
  1290. %
  1291. % \begin{macro}{\partopsep}
  1292. %    When the user leaves a blank line before the environment an extra
  1293. %    vertical space of |\partopsep| is inserted, in addition to
  1294. %    |\parskip| and |\topsep|.
  1295. %    \begin{macrocode}
  1296. \setlength\partopsep{0\p@}
  1297. %    \end{macrocode}
  1298. % \end{macro}
  1299. %
  1300. % \begin{macro}{\@beginparpenalty}
  1301. % \begin{macro}{\@endparpenalty}
  1302. %    These penalties are inserted before and after a list or paragraph
  1303. %    environment. They are set to a bonus value to encourage page
  1304. %    breaking at these points.
  1305. % \begin{macro}{\@itempenalty}
  1306. %    This penalty is inserted between list items.
  1307. %    \begin{macrocode}
  1308. \@beginparpenalty -\@lowpenalty
  1309. \@endparpenalty   -\@lowpenalty
  1310. \@itempenalty     -\@lowpenalty
  1311. %    \end{macrocode}
  1312. % \end{macro}
  1313. % \end{macro}
  1314. % \end{macro}
  1315. %
  1316. % \begin{macro}{\@listI}
  1317. % \begin{macro}{\@listi}
  1318. % |\@listI| defines top level and |\@listi| values of
  1319. % |\leftmargin|, |\parsep|, |\topsep|, and |\itemsep|
  1320. %
  1321. %    \begin{macrocode}
  1322. \def\@listI{\setlength\leftmargin{\leftmargini}
  1323.             \setlength\parsep {0\p@}%
  1324.             \setlength\topsep {.4em}%
  1325.             \setlength\itemsep{.4em}}
  1326. \let\@listi\@listI
  1327. %    \end{macrocode}
  1328. %    We have to initialize these parameters.
  1329. %    \begin{macrocode}
  1330. \@listi
  1331. %    \end{macrocode}
  1332. % \end{macro}
  1333. % \end{macro}
  1334. %
  1335. % \begin{macro}{\@listii}
  1336. % \begin{macro}{\@listiii}
  1337. % \begin{macro}{\@listiv}
  1338. % \begin{macro}{\@listv}
  1339. % \begin{macro}{\@listvi}
  1340. %    Here are the same macros for the higher level lists.
  1341. %    \begin{macrocode}
  1342. \def\@listii {\setlength  \leftmargin{\leftmarginii}%
  1343.               \setlength  \labelwidth{\leftmarginii}%
  1344.               \addtolength\labelwidth{-\labelsep}}
  1345. \def\@listiii{\setlength  \leftmargin{\leftmarginiii}%
  1346.               \setlength  \labelwidth{\leftmarginiii}%
  1347.               \addtolength\labelwidth{-\labelsep}%
  1348.               \setlength  \topsep    {.2em}%
  1349.               \setlength  \itemsep   {\topsep}}
  1350. \def\@listiv {\setlength  \leftmargin{\leftmarginiv}%
  1351.               \setlength  \labelwidth{\leftmarginiv}%
  1352.               \addtolength\labelwidth{-\labelsep}}
  1353. \def\@listv  {\setlength  \leftmargin{\leftmarginv}%
  1354.               \setlength  \labelwidth{\leftmarginv}%
  1355.               \addtolength\labelwidth{-\labelsep}}
  1356. \def\@listvi {\setlength  \leftmargin{\leftmarginvi}%
  1357.               \setlength  \labelwidth{\leftmarginvi}%
  1358.               \addtolength\labelwidth{-\labelsep}}
  1359. %    \end{macrocode}
  1360. % \end{macro}
  1361. % \end{macro}
  1362. % \end{macro}
  1363. % \end{macro}
  1364. % \end{macro}
  1365. %
  1366. % \subsubsection{Enumerate}
  1367. %
  1368. %    The enumerate environment uses  four counters: \Lcount{enumi},
  1369. %    \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
  1370. %    \Lcount{enumN} controls the numbering of the Nth level
  1371. %    enumeration.
  1372. %
  1373. % \begin{macro}{\theenumi}
  1374. % \begin{macro}{\theenumii}
  1375. % \begin{macro}{\theenumiii}
  1376. % \begin{macro}{\theenumiv}
  1377. %    The counters are already defined in \file{latex.tex}, but their
  1378. %    representation is changed here.
  1379. %
  1380. %    \begin{macrocode}
  1381. \renewcommand\theenumi{\@arabic\c@enumi}
  1382. \renewcommand\theenumii{\@alph\c@enumii}
  1383. \renewcommand\theenumiii{\@roman\c@enumiii}
  1384. \renewcommand\theenumiv{\@Alph\c@enumiv}
  1385. %    \end{macrocode}
  1386. % \end{macro}
  1387. % \end{macro}
  1388. % \end{macro}
  1389. % \end{macro}
  1390. %
  1391. % \begin{macro}{\labelenumi}
  1392. % \begin{macro}{\labelenumii}
  1393. % \begin{macro}{\labelenumiii}
  1394. % \begin{macro}{\labelenumiv}
  1395. %    The commands |\labelenumi| ... |\labelenumiv| generate the label
  1396. %    for each item.
  1397. %    \begin{macrocode}
  1398. \newcommand\labelenumi{\theenumi.}
  1399. \newcommand\labelenumii{(\theenumii)}
  1400. \newcommand\labelenumiii{\theenumiii.}
  1401. \newcommand\labelenumiv{\theenumiv.}
  1402. %    \end{macrocode}
  1403. % \end{macro}
  1404. % \end{macro}
  1405. % \end{macro}
  1406. % \end{macro}
  1407. %
  1408. % \begin{macro}{\p@enumii}
  1409. % \begin{macro}{\p@enumiii}
  1410. % \begin{macro}{\p@enumiv}
  1411. %    The expansion of |\p@enumN||\theenumN| defines the output of a
  1412. %    |\ref| command when referencing an item of the Nth level of an
  1413. %    enumerated list.
  1414. %    \begin{macrocode}
  1415. \renewcommand\p@enumii{\theenumi}
  1416. \renewcommand\p@enumiii{\theenumi(\theenumii)}
  1417. \renewcommand\p@enumiv{\p@enumiii\theenumiii}
  1418. %    \end{macrocode}
  1419. % \end{macro}
  1420. % \end{macro}
  1421. % \end{macro}
  1422. %
  1423. % \subsubsection{Itemize}
  1424. %
  1425. % \begin{macro}{\labelitemi}
  1426. % \begin{macro}{\labelitemii}
  1427. % \changes{v1.2h}{1994/05/06}{Inserted \cs{normalfont}}
  1428. % \begin{macro}{\labelitemiii}
  1429. % \begin{macro}{\labelitemiv}
  1430. % Itemization is controlled by  |\labelitemi|,
  1431. % |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
  1432. % the labels of the various itemization levels: the symbols used are
  1433. % bullet, bold en-dash, asterisk and centered dot.
  1434. %
  1435. % \changes{v1.2n}{1994/07/11}{renamed \cs{labelitemiiii} to
  1436. %    \cs{labelitemiii}}
  1437. %    \begin{macrocode}
  1438. \newcommand\labelitemi{$\m@th\bullet$}
  1439. \newcommand\labelitemii{\normalfont\bfseries --}
  1440. \newcommand\labelitemiii{$\m@th\ast$}
  1441. \newcommand\labelitemiv{$\m@th\cdot$}
  1442. %    \end{macrocode}
  1443. % \end{macro}
  1444. % \end{macro}
  1445. % \end{macro}
  1446. % \end{macro}
  1447. %
  1448. % \subsubsection{Description}
  1449. %
  1450. % \begin{environment}{description}
  1451. %    The description environment is defined here -- while the itemize
  1452. %    and enumerate environments are defined in \file{latex.tex}.
  1453. %
  1454. %    \begin{macrocode}
  1455. \newenvironment{description}
  1456.                {\list{}{\labelwidth\z@ \itemindent-\leftmargin
  1457.                         \let\makelabel\descriptionlabel}}
  1458.                {\endlist}
  1459. %    \end{macrocode}
  1460. % \end{environment}
  1461. %
  1462. % \begin{macro}{\descriptionlabel}
  1463. %    To change the formatting of the label, you must redefine
  1464. %    |\descriptionlabel|.
  1465. %
  1466. % \changes{v1.2q}{1995/03/14}{made command short}
  1467. %    \begin{macrocode}
  1468. \newcommand*{\descriptionlabel}[1]{\hspace\labelsep
  1469.                                 \normalfont\bfseries #1}
  1470. %    \end{macrocode}
  1471. % \end{macro}
  1472. %
  1473. % \subsection{Defining new environments}
  1474. %
  1475.  
  1476. % \subsubsection{Verse}
  1477. %
  1478. % \begin{environment}{verse}
  1479. %   The verse environment is defined by making clever use of the
  1480. %   list environment's parameters.  The user types |\\| to end a line.
  1481. %   This is implemented by |\let|'ing |\\| equal |\@centercr|.
  1482. %
  1483. %    \begin{macrocode}
  1484. \newenvironment{verse}
  1485.                {\let\\=\@centercr
  1486.                 \list{}{\setlength\itemsep{\z@}%
  1487.                         \setlength\itemindent{-15\p@}%
  1488.                         \setlength\listparindent{\itemindent}%
  1489.                         \setlength\rightmargin{\leftmargin}%
  1490.                         \addtolength\leftmargin{15\p@}}%
  1491.                 \item[]}
  1492.                {\endlist}
  1493. %    \end{macrocode}
  1494. % \end{environment}
  1495. %
  1496. % \subsubsection{Quotation}
  1497. %
  1498. % \begin{environment}{quotation}
  1499. %   The quotation environment is also defined by making clever use of
  1500. %   the list environment's parameters. The lines in the environment
  1501. %   are set smaller than |\textwidth|. The first line of a paragraph
  1502. %   inside this environment is indented.
  1503. %
  1504. %    \begin{macrocode}
  1505. \newenvironment{quotation}
  1506.                {\list{}{\setlength\listparindent{1.5em}%
  1507.                         \setlength\itemindent{\listparindent}%
  1508.                         \setlength\rightmargin{\leftmargin}}%
  1509.                 \item[]}
  1510.                {\endlist}
  1511. %    \end{macrocode}
  1512. % \end{environment}
  1513. %
  1514. % \subsubsection{Quote}
  1515. %
  1516. % \begin{environment}{quote}
  1517. %   The quote environment is like the quotation environment except
  1518. %   that paragraphs are not indented.
  1519. %
  1520. %    \begin{macrocode}
  1521. \newenvironment{quote}
  1522.                {\list{}{\setlength\rightmargin{\leftmargin}}%
  1523.                 \item[]}
  1524.                {\endlist}
  1525. %    \end{macrocode}
  1526. % \end{environment}
  1527. %
  1528. % \subsubsection{Theorem}
  1529. %
  1530. %    This document class does not define it's own theorem environments,
  1531. %    the defaults, supplied by \file{latex.ltx} are available.
  1532. %
  1533.  
  1534. % \subsection{Setting parameters for existing environments}
  1535. %
  1536. % \subsubsection{Array and tabular}
  1537. %
  1538. % \begin{macro}{\arraycolsep}
  1539. %    The columns in an array environment are separated by
  1540. %    2|\arraycolsep|.
  1541. %    \begin{macrocode}
  1542. \setlength\arraycolsep{5\p@}
  1543. %    \end{macrocode}
  1544. % \end{macro}
  1545. %
  1546. % \begin{macro}{\tabcolsep}
  1547. %    The columns in an tabular environment are separated by
  1548. %    2|\tabcolsep|.
  1549. %    \begin{macrocode}
  1550. \setlength\tabcolsep{6\p@}
  1551. %    \end{macrocode}
  1552. % \end{macro}
  1553. %
  1554. % \begin{macro}{\arrayrulewidth}
  1555. %    The width of vertical rules in the array and tabular environments
  1556. %    is given by |\arrayrulewidth|.
  1557. %    \begin{macrocode}
  1558. \setlength\arrayrulewidth{.4\p@}
  1559. %    \end{macrocode}
  1560. % \end{macro}
  1561. %
  1562. % \begin{macro}{\doublerulesep}
  1563. %    The space between adjacent rules in the array and tabular
  1564. %    environments is given by |\doublerulesep|.
  1565. %    \begin{macrocode}
  1566. \setlength\doublerulesep{2\p@}
  1567. %    \end{macrocode}
  1568. % \end{macro}
  1569. %
  1570. % \subsubsection{Tabbing}
  1571. %
  1572. % \begin{macro}{\tabbingsep}
  1573. %    This controls the space that the |\'| command puts in. (See
  1574. %    \LaTeX{} manual for an explanation.)
  1575. %    \begin{macrocode}
  1576. \setlength\tabbingsep{\labelsep}
  1577. %    \end{macrocode}
  1578. % \end{macro}
  1579. %
  1580. % \subsubsection{Minipage}
  1581. %
  1582. % \begin{macro}{\@minipagerestore}
  1583. %    The macro |\@minipagerestore| is called upon entry to a minipage
  1584. %    environment to set up things that are to be handled differently
  1585. %    inside a minipage environment. In the current styles, it does
  1586. %    nothing.
  1587. % \end{macro}
  1588. %
  1589. % \begin{macro}{\@mpfootins}
  1590. %    Minipages have their own footnotes; |\skip||\@mpfootins| plays
  1591. %    same r\^ole for footnotes in a minipage as |\skip||\footins| does
  1592. %    for ordinary footnotes.
  1593. %
  1594. %    \begin{macrocode}
  1595. \skip\@mpfootins = \skip\footins
  1596. %    \end{macrocode}
  1597. % \end{macro}
  1598. %
  1599. % \subsubsection{Framed boxes}
  1600. %
  1601. % \begin{macro}{\fboxsep}
  1602. %    The space left by |\fbox| and |\framebox| between the box and the
  1603. %    text in it.
  1604. % \begin{macro}{\fboxrule}
  1605. %    The width of the rules in the box made by |\fbox| and |\framebox|.
  1606. %    \begin{macrocode}
  1607. \setlength\fboxsep{3\p@}
  1608. \setlength\fboxrule{.4\p@}
  1609. %    \end{macrocode}
  1610. % \end{macro}
  1611. % \end{macro}
  1612. %
  1613. % \subsubsection{Equation and eqnarray}
  1614. %
  1615. % \begin{macro}{\theequation}
  1616. %    The equation counter will be typeset using arabic numbers.
  1617. %    \begin{macrocode}
  1618. \renewcommand\theequation{\@arabic\c@equation}
  1619. %    \end{macrocode}
  1620. % \end{macro}
  1621. %
  1622. % \begin{macro}{\jot}
  1623. %    |\jot| is the extra space added between lines of an eqnarray
  1624. %    environment. The default value is used.
  1625. %    \begin{macrocode}
  1626. % \setlength\jot{3pt}
  1627. %    \end{macrocode}
  1628. % \end{macro}
  1629. %
  1630. % \begin{macro}{\@eqnnum}
  1631. %    The macro |\@eqnnum| defines how equation numbers are to appear in
  1632. %    equations. Again the default is used.
  1633. %
  1634. %    \begin{macrocode}
  1635. % \def\@eqnnum{(\theequation)}
  1636. %    \end{macrocode}
  1637. % \end{macro}
  1638. %
  1639. % \subsection{Font changing}
  1640. %
  1641. %    Here we supply the declarative font changing commands that were
  1642. %    common in \LaTeX\ version 2.09 and earlier. These commands work
  1643. %    in text mode \emph{and} in math mode. They are provided for
  1644. %    compatibility, but one should start using the |\text...| and
  1645. %    |\math...| commands instead. These commands are redefined using
  1646. %    |\@renewfontswitch|, a command with three arguments: the user
  1647. %    command to be defined; \LaTeX\ commands to execute in text mode
  1648. %    and \LaTeX\ commands to execute in math mode.
  1649. %
  1650. %  \begin{macro}{\rm}
  1651. %  \begin{macro}{\tt}
  1652. %  \begin{macro}{\sf}
  1653. %    The commands to change the family.
  1654. % \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
  1655. % \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
  1656. %    \cs{@renewfontswitch}, removed switch.}
  1657. % \changes{v1.2d}{1994/04/14}{\cs{@renewfontswitch} has become
  1658. %    \cs{DeclareOldFontCommand}}
  1659. %    \begin{macrocode}
  1660. \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
  1661. \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  1662. \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  1663. %    \end{macrocode}
  1664. %  \end{macro}
  1665. %  \end{macro}
  1666. %  \end{macro}
  1667. %
  1668. %  \begin{macro}{\bf}
  1669. %    The command to change to the bold series. One should use
  1670. %    |\mdseries| to explicitly switch back to medium series.
  1671. % \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
  1672. % \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
  1673. %    \cs{@renewfontswitch}, removed switch.}
  1674. %    \begin{macrocode}
  1675. \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  1676. %    \end{macrocode}
  1677. %  \end{macro}
  1678. %
  1679. %  \begin{macro}{\sl}
  1680. %  \begin{macro}{\it}
  1681. %  \begin{macro}{\sc}
  1682. %
  1683. %    And the commands to change the shape of the font. The slanted and
  1684. %    small caps shapes are not available by default as math alphabets,
  1685. %    so those changes do nothing in math mode. One should use
  1686. %    |\upshape| to explicitly change back to the upright shape.
  1687. % \changes{v1.0a}{1993/12/14}{Added compatibility mode support.}
  1688. % \changes{v1.1}{1993/12/18}{Changed \cs{@newfontswitch} to
  1689. %    \cs{@renewfontswitch}, removed switch.}
  1690. % \changes{v1.1b}{1993/12/20}{Added forgotten re.}
  1691. %    \begin{macrocode}
  1692. \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  1693. \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
  1694. \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
  1695. %    \end{macrocode}
  1696. %  \end{macro}
  1697. %  \end{macro}
  1698. %  \end{macro}
  1699. %
  1700. % \begin{macro}{\cal}
  1701. % \changes{v1.0a}{1993/12/14}{Macro added}
  1702. % \begin{macro}{\mit}
  1703. % \changes{v1.0a}{1993/12/14}{Macro added}
  1704. %
  1705. %    The commands |\cal| and |\mit| should only be used in math mode,
  1706. %    outside math mode they have no effect. Currently the New Font
  1707. %    Selection Scheme defines these commands to generate warning
  1708. %    messages. Therefore we have to define them `by hand'.
  1709. % \changes{v1.2p}{1994/12/11}{Now define \cs{cal} and \cs{mit} using
  1710. %    \cs{DeclareRobustCommand*}}
  1711. %    \begin{macrocode}
  1712. \DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
  1713. \DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
  1714. %    \end{macrocode}
  1715. %  \end{macro}
  1716. %  \end{macro}
  1717. %
  1718. % \subsection{Footnotes}
  1719. %
  1720. % \begin{macro}{\footnoterule}
  1721. %    Usually, footnotes are separated from the main body of the text
  1722. %    by a small rule. This rule is drawn by the macro |\footnoterule|.
  1723. %    We have to make sure that the rule takes no vertical space (see
  1724. %    \file{plain.tex}) so we compensate for the natural height of the
  1725. %    rule of 0.4pt by adding the right amount of vertical skip.
  1726. %
  1727. %    To prevent the rule from colliding with the footnote we first add
  1728. %    a little negative vertical skip, then we put the rule and make
  1729. %    sure we end up at the same point where we begun this operation.
  1730. %    \begin{macrocode}
  1731. \renewcommand\footnoterule{%
  1732.   \kern-\p@
  1733.   \hrule \@width .4\columnwidth
  1734.   \kern .6\p@}
  1735. %    \end{macrocode}
  1736. % \end{macro}
  1737. %
  1738. % \begin{macro}{\c@footnote}
  1739. %    A counter for footnotes.
  1740. %    \begin{macrocode}
  1741. % \newcounter{footnote}
  1742. %    \end{macrocode}
  1743. % \end{macro}
  1744. %
  1745. % \begin{macro}{\@makefntext}
  1746. % \changes{v1.2c}{1994/03/08}{Always call \cs{@makefnmark}.}
  1747. %    The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
  1748. %    to produce the actual footnote. The macro gets the text of the
  1749. %    footnote as its argument and should use |\@makefnmark| to produce
  1750. %    the mark of the footnote. The macro |\@makefntext| is called when
  1751. %    effectively inside a |\parbox| of width |\columnwidth| (i.e.,
  1752. %    with |\hsize| = |\columnwidth|).
  1753. %
  1754. %   An example of what can be achieved is given by the following piece
  1755. %   of \TeX\ code.
  1756. % \begin{verbatim}
  1757. %          \long\def\@makefntext#1{%
  1758. %             \@setpar{\@@par
  1759. %                      \@tempdima = \hsize
  1760. %                      \advance\@tempdima-10pt
  1761. %                      \parshape \@ne 10pt \@tempdima}%
  1762. %             \par
  1763. %             \parindent 1em\noindent
  1764. %             \hb@xt@\z@{\hss\@makefnmark}#1}
  1765. % \end{verbatim}
  1766. %    The effect of this definition is that all lines of the footnote
  1767. %    are indented by 10pt, while the first line of a new paragraph is
  1768. %    indented by 1em. To change these dimensions, just substitute the
  1769. %    desired value for `10pt' (in both places) or `1em'.  The mark is
  1770. %    flush right against the footnote.
  1771. %
  1772. %    In these document class we use a simpler macro, in which the
  1773. %    footnote text is set like an ordinary text paragraph, with no
  1774. %    indentation except on the first line of a paragraph, and the
  1775. %    first line of the footnote. Thus, all the macro must do is set
  1776. %    |\parindent| to the appropriate value for succeeding paragraphs
  1777. %    and put the proper indentation before the mark.
  1778. %
  1779. %    \begin{macrocode}
  1780. \long\def\@makefntext#1{%
  1781.     \noindent
  1782.     \hangindent 5\p@
  1783.     \hb@xt@5\p@{\hss\@makefnmark}#1}
  1784. %    \end{macrocode}
  1785. % \end{macro}
  1786. %
  1787. % \begin{macro}{\@makefnmark}
  1788. %    The footnote markers that are printed in the text to point to the
  1789. %    footnotes should be produced by the macro |\@makefnmark|. We use
  1790. %    the default definition for it.
  1791. %    \begin{macrocode}
  1792. %\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
  1793. %    \end{macrocode}
  1794. % \end{macro}
  1795. %
  1796. % \subsection{Words}
  1797. %
  1798. % \begin{macro}{\ccname}
  1799. % \begin{macro}{\enclname}
  1800. % \begin{macro}{\pagename}
  1801. % \begin{macro}{\headtoname}
  1802. %     This document class is for documents prepared in the English
  1803. %     language. To prepare a version for another language, various
  1804. %     English words must be replaced.  All the English words that
  1805. %     require replacement are  defined below in command names.
  1806. %    \begin{macrocode}
  1807. \newcommand*{\ccname}{cc}
  1808. \newcommand*{\enclname}{encl}
  1809. \newcommand*{\pagename}{Page}
  1810. \newcommand*{\headtoname}{To}
  1811. %    \end{macrocode}
  1812. % \end{macro}
  1813. % \end{macro}
  1814. % \end{macro}
  1815. % \end{macro}
  1816.  
  1817. % \subsection{Date}
  1818. %
  1819. % \begin{macro}{\today}
  1820. %    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
  1821. %    to provide the date of the \LaTeX-run.
  1822. %    \begin{macrocode}
  1823. \newcommand*{\today}{\ifcase\month\or
  1824.   January\or February\or March\or April\or May\or June\or
  1825.   July\or August\or September\or October\or November\or December\fi
  1826.   \space\number\day, \number\year}
  1827. %    \end{macrocode}
  1828. % \end{macro}
  1829. %
  1830. % \subsection{Two column mode}
  1831. %
  1832. % \begin{macro}{\columnsep}
  1833. %    This gives the distance between two columns in two column mode.
  1834. %    \begin{macrocode}
  1835. \setlength\columnsep{10\p@}
  1836. %    \end{macrocode}
  1837. % \end{macro}
  1838. %
  1839. % \begin{macro}{\columnseprule}
  1840. %    This gives the width of the rule between two columns in two
  1841. %    column mode. We have no visible rule.
  1842. %    \begin{macrocode}
  1843. \setlength\columnseprule{0\p@}
  1844. %    \end{macrocode}
  1845. % \end{macro}
  1846. %
  1847. % \subsection{The page style} 
  1848. %    We have \pstyle{plain} pages in this document class by
  1849. %    default. We use arabic page numbers.
  1850. %    \begin{macrocode}
  1851. \pagestyle{plain}
  1852. \pagenumbering{arabic}
  1853. %    \end{macrocode}
  1854. %
  1855. % \subsection{Single or double sided printing}
  1856. %
  1857. %    We don't try to make each page as long as all the others.
  1858. %    \begin{macrocode}
  1859. \raggedbottom
  1860. %    \end{macrocode}
  1861. %
  1862. % \begin{macro}{\@texttop}
  1863. %    The document class letter sets |\@texttop| to |\vskip| 0pt
  1864. %    \texttt{plus} .00006fil on the first page of a letter, which
  1865. %    centers a short letter on the page. This fil value may have to be
  1866. %    changed for other letterheads.  This setting has to be done after
  1867. %    |\raggedbottom| is executed, since the latter sets |\@texttop| to
  1868. %    |\relax|.
  1869. %    \begin{macrocode}
  1870. \def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
  1871. %    \end{macrocode}
  1872. % \end{macro}
  1873. %
  1874. %    We always start in one column mode.
  1875. %    \begin{macrocode}
  1876. \onecolumn
  1877. %</letter>
  1878. %    \end{macrocode}
  1879. %
  1880. %
  1881. %
  1882. % \Finale
  1883. %
  1884. \endinput
  1885.