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
\advance\vsize by-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\headline={\ifnum\pageno>1
  \tenrm To \addressee\hfil\today\hfil Page \folio
  \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
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
  \global\setbox\theaddress=\vbox\bgroup\raggedright%
  \hsize=\longindentation \everypar{\hangindent2em}#2
  \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}

  

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\smallheadfont=cmr8 at 8truept
\font\largeheadfont=cmdunh10 at 14.4truept
\font\logofont=manfnt at 14.4truept

\def\emletterhead{
  \def\sendingaddress{%Eric Macaulay\par
    {\up Phone no}\par http://mathmeth.com/eem\par eric\char'100mathmeth.com\par}
  \def\returnaddress{Eric Macaulay\par
    Road, County, City, Postcode}
  \letterhead}
  
\def\letterhead{\pageno=1 \def\addressee{} \univletterhead
  {\leftskip=\longindentation
    {\baselineskip9truept\smallheadfont\sendingaddress}
    \bigskip\bigskip\rm\today\bigskip}}
    
\def\univletterhead{\vglue-\voffset
  \hbox{\hbox to\longindentation{\raise4truemm\hbox{\logofont
    \kern2truept X\kern-1.667truept
    \lower2truept\hbox{X}\kern-1.667truept X}\hfil
    \largeheadfont Eric Macaulay\hfil}%
    \kern-\longindentation
    \vbox{\smallheadfont\baselineskip9truept
      \leftskip=\longindentation Road\par County, City, Postcode}}
    \vskip2truept\hrule\vskip4truept}


7. Names of the sections.
letterformat.tex
Macros