0. letterformat. This TeX macro package allows us to nicely format our correspondence.

### letterformat.tex:

Macros



1. We begin with a simple macro that expands to the current date.

### Macros:

\def\today{\number\day \space\ifcase\month\or
January\or February\or March\or April\or May\or \June\or
July\or August\or September\or October\or November\or December\fi
\space\number\year}



2. Next comes the specification of page layout, which is ragged" at the bottom. A rather large \interlinepenalty is used so that page breaks will tend to occur between paragraphs.

### Macros:

\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
\voffset=24pt
\parindent=0pt
\parskip=0pt
\nopagenumbers
\else\hfil\fi}



3. The contents of a letter are typeset either in line mode" (obeying lines) or in paragraph" mode (producing paragraphs in block style). Control sequences \beginlinemode and \beginparmode are defined to initiate these modes; and another control sequence, \endmode, is defined and redefined so that the current mode will terminate properly:

### Macros:

\def\beginlinemode{\endmode
\begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
\begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}



4. One of the chief characteristics of this particular business letter format is a parameter called \longindentation, which is used to indent the closing material, the date, and certain aspects of the letterhead. The \address macro creates a box that will be used both in the letter and in the label on the envelope. If individual lines of the address exceed \longindentation, they are broken, and hanging indentation is used for any material that must be carried over. (Parameter #2 to \getaddress will be the contents of the line following \address, i.e., the name of the addressee.)

### Macros:

\newdimen\longindentation \longindentation=4truein
#2
\hsize=\longindentation \everypar{\hangindent2em}#2



5. The closing macros are careful not to allow a page break anywhere between the end of the \body and the beginning of a \ps.

### Macros:

  \def\body{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
#2
{#1\nobreak\bigskip \leftskip=\longindentation #2
\nobreak\bigskip\bigskip\bigskip % space for signature
\def
{\endgraf\nobreak}}}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
\interlinepenalty5000\def\par{\endgraf\penalty5000}}



6. The remaining portion of letterformat.tex deals with letterheads and labels, which of course will be different for different organizations. The following macros were used to generate the examples in this appendix; they can be modified in more-or-less obvious ways to produce suitable letterheads of other kinds. Special fonts are generally needed, and they should be loaded at true' sizes so that they are not affected by magnification. One tiny refinement worth noting here is the \up macro, which raises brackets so that they look better in a telephone number.

### Macros:

\def\up#1{\leavevmode \raise.16ex\hbox{#1}}
\font\logofont=manfnt at 14.4truept

{\up Phone no}\par http://mathmeth.com/eem\par eric\char'100mathmeth.com\par}

{\leftskip=\longindentation
\bigskip\bigskip\rm\today\bigskip}}

\vskip2truept\hrule\vskip4truept}`