<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% lettermac.tex
%
% J. Daniel Smith
% 8 November 1989
%
% Simple macros for writing letters
%
% Last Updated:
%   JDS   23 May 90
%
% don't indent paragraphs
\newdimen\oldparindent \oldparindent=\parindent
\parindent=0pt
%
% don't do so much complaining
\tolerance=10000 \hbadness=9999 \vbadness=9999
%
% make \narrower work correctly with \parindent
\def\narrower{\advance\leftskip by\oldparindent
	      \advance\rightskip by\oldparindent}
%
% leave a blank line between paragraphs
\parskip=10pt plus 1pt minus 0.5pt
% 
% page breaks between paragraphs when possible
\interlinepenalty=1000
%
% skip over a bit on the page
\def\info#1{\hskip.6\hsize#1\par\par}
%
% of course, we don't want page numbers
\nopagenumbers
%
% turn off hyphenation
\pretolerance=10000\hyphenpenalty=10000
%
% get the name of the address file from the user
\def\getaddress#1{\begingroup
		   \newlinechar=`@ \def\\{@}
		   \message{@#1}
		   \message{@Enter the name of the address file: }
		   \endlinechar=-1
		   \read-1 to\AddressFileName
		   \global\edef\InputAddressFileName{\AddressFileName.adr}
		  \endgroup
		  \obeyspaces   % keep spaces in address
		  % Make it easier to type '#' and '&amp;' in addresses
		  \catcode`\#=12\catcode`\&amp;=12
		  \input\InputAddressFileName 
		  \catcode`\#=6\catcode`\&amp;=4
		  \let\getaddress\relax}
%
% address at top of letter
\def\setaddress#1{\gdef\Xaddress{#1}}
    \setaddress{\hbox{\bf * ADDRESS *}}
\def\address{\par{\vskip\parskip\parskip=0pt\def\\{\par}
                  \frenchspacing\Xaddress}
             \par\let\address\relax}
%
% Various items that might be used throughout the letter.  Defaults
% are set to something obnoxious so that if they are used without
% being set it will be obvious
\def\settitle#1{\gdef\Xtitle{#1}}
    \settitle{\hbox{\bf * TITLE *}}
\def\title{\Xtitle}
%
\def\setfirstname#1{\gdef\Xfirstname{#1}}
    \setfirstname{\hbox{\bf * FIRSTNAME *}}
\def\firstname{\Xfirstname}
%
\def\setlastname#1{\gdef\Xlastname{#1}}
    \setlastname{\hbox{\bf * LASTNAME *}}
\def\lastname{\Xlastname}
%
\def\setcompany#1{\global\def\Xcompany{#1}}
    \setcompany{\hbox{\bf * COMPANY *}}
\def\company{\Xcompany}
%
% addressee
\def\addressee{Dear \Xtitle\ \Xlastname,\par}
%
% attn for envelopes
\def\attn#1{\gdef\Xattn{Attn: #1}}
%               \gdef\attn{\par\vfill\line\bgroup\hbox{Attn: \Xattn}\hfil}}
\let\Xattn=\relax % don't do anything unless its \attn is used
%
% ZIP code.  For compatability with envelope macros.
\let\zipbar=\relax
% closings
\def\signature#1#2{\vskip\parskip{\vbox{\info{#1,}\vskip.35true in\info{#2}}
                 \let\signature\relax}}
\def\sincerely#1{\signature{Sincerely}{#1}\let\sincerely\relax}
\def\love#1{\signature{Love}{#1}\let\love\relax}
%
% cc:
\def\cc#1{\par{\vskip\parskip\parskip=0pt\def\\{\par}
               {\rm cc: }\everypar={\phantom{\rm cc: }}#1}
          \let\cc\relax}
% RE:
\def\re#1{\par{\vskip\parskip\parskip=0pt\def\\{\par}
               {\rm RE: }\everypar={\phantom{\rm RE: }}#1}
          \let\re\relax}
%
% The date at the top of the letter
% If a date is not set, then the current date is used.
\def\Xtoday{\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}
\def\today#1{\gdef\Xtoday{#1}}
\def\date{\info{\Xtoday}\let\date\relax}
</pre></body></html>