| 1 |
% LETTER PSIZZL - letter macros |
| 2 |
% |
| 3 |
% I am indebted to Louise Addis, SLAC, for help in designing the |
| 4 |
% style of the letter. |
| 5 |
% |
| 6 |
% The letter will print with your institution's letterhead. |
| 7 |
% You then take the letter and copy it on bond. |
| 8 |
% The original hardcopy becomes your file copy. |
| 9 |
% |
| 10 |
% \letterto{Name}{address} Name will appear in the salutation. |
| 11 |
% note the comma or colon here. |
| 12 |
% e.g., address will be the full address. |
| 13 |
% \letterto{John,}% use \cr to separate lines. |
| 14 |
% {Mr.@John Doe\cr% |
| 15 |
% Physics Department\cr% |
| 16 |
% University of California, Berkeley\cr% |
| 17 |
% Berkeley, CA 94720\cr}% |
| 18 |
% |
| 19 |
% \letterfrom{signature}{mail stop}{initials} |
| 20 |
% initials will possibly appear at the foot of |
| 21 |
% e.g., the letter |
| 22 |
% \letterfrom% signature will appear in the close |
| 23 |
% {Jane Doe\cr address is incorporated in the letterhead |
| 24 |
% Chief Honcho\cr}% |
| 25 |
% {Bin 2}{JD}% |
| 26 |
% |
| 27 |
% \letterdate{date} you may optionally specify the date of the |
| 28 |
% letter. The default date however, is today. |
| 29 |
% e.g., \letterdate{7 July 1983}% |
| 30 |
% |
| 31 |
% \salutation{Ave}% here's how to modify the standard salutation |
| 32 |
% (default is Dear) |
| 33 |
% |
| 34 |
% \MyRef{text}% specifies the writer's reference number for |
| 35 |
% this letter. Default is none. |
| 36 |
% If you use this you get Ref: <text> near |
| 37 |
% the top of the letter. |
| 38 |
% |
| 39 |
% \YourRef{text}% similar to \MyRef. Specifies the reference |
| 40 |
% number of the addressee's letter to which |
| 41 |
% you're responding. Default is none. |
| 42 |
% |
| 43 |
% \copiesto{name\cr name\cr ...name\cr}% |
| 44 |
% specifies who gets copies of the letter |
| 45 |
% aside from the addressee. A list of names |
| 46 |
% will appear at the end of the letter. |
| 47 |
% Default is none |
| 48 |
% |
| 49 |
% \closing{Yours truly,}% and how to modify the standard close |
| 50 |
% (default is Sincerely,) |
| 51 |
% |
| 52 |
% \everyletter{text}% text to be inserted |
| 53 |
% at the end of every letter. |
| 54 |
% May be an entire letter body. |
| 55 |
% |
| 56 |
% \beginletter the letter now begins on a new page |
| 57 |
% with date, address, salutation |
| 58 |
% |
| 59 |
% text now comes the text of the letter |
| 60 |
% |
| 61 |
% \endletter this puts out the closing |
| 62 |
% |
| 63 |
\newif\ifletter |
| 64 |
\newskip\lettertopskip\lettertopskip\z@ plus\z@ minus\z@ |
| 65 |
\def\letterdate#1{% |
| 66 |
\def\l@tterdate{#1}% |
| 67 |
}\letterdate\d@te |
| 68 |
\def\salutation#1{% |
| 69 |
\def\s@lutation{#1}% |
| 70 |
}\salutation{Dear}% |
| 71 |
\def\closing#1{% |
| 72 |
\def\cl@sing{#1}% |
| 73 |
}\closing{Sincerely,}% |
| 74 |
\def\typist#1{% |
| 75 |
\def\t@pist{:\lowercase{#1}}% |
| 76 |
}\def\t@pist{}% |
| 77 |
\def\copiesto#1{% |
| 78 |
\def\c@pies{% |
| 79 |
\hbox{% |
| 80 |
\vtop{\hbox{cc: }\vfil}% |
| 81 |
\vtop{\singlespace |
| 82 |
\halign{\vbox{\parindent\z@\hsize.8\hsize####}\hfil\cr |
| 83 |
#1\crcr}% |
| 84 |
}% |
| 85 |
}% |
| 86 |
\vskip\baselineskip |
| 87 |
}% |
| 88 |
}\def\c@pies{}% |
| 89 |
\def\postscript#1{% |
| 90 |
\def\p@st{#1}% |
| 91 |
}\def\p@st{}% |
| 92 |
\def\enclosure#1#2{% |
| 93 |
\def\@ncl{% |
| 94 |
{\par\parindent\z@#1\par\singlespace |
| 95 |
\halign{% |
| 96 |
\quad\vbox{\parindent\z@\hsize.8\hsize####}\hfil\cr |
| 97 |
#2\crcr}\par |
| 98 |
}% |
| 99 |
}% |
| 100 |
}\def\@ncl{}% |
| 101 |
\def\prescript#1{% |
| 102 |
\def\pr@{#1}% |
| 103 |
}\def\pr@{}% |
| 104 |
% |
| 105 |
\def\MyRef#1{% |
| 106 |
\def\M@Ref{Ref: #1\cr}% |
| 107 |
}\def\M@Ref{}% |
| 108 |
\def\YourRef#1{% |
| 109 |
\def\Y@urRef{Your Ref: #1\cr}% |
| 110 |
}\def\Y@urRef{}% |
| 111 |
% |
| 112 |
\def\breakletter{% |
| 113 |
\par\vfil\eject |
| 114 |
}% break the title page of a letter |
| 115 |
\def\letterto#1#2{% |
| 116 |
\def\@ddressee{#1}\gdef\@ddress{#2}% |
| 117 |
}\letterto{}{}% |
| 118 |
\def\letterfrom#1#2#3{% |
| 119 |
\def\s@ndername{#1}\gdef\s@nderbin{#2}\gdef\s@nderinitials{#3}% |
| 120 |
}\letterfrom{}{}{}% |
| 121 |
\def\letterstyle#1{% |
| 122 |
\adddef\stylel@t{#1}% |
| 123 |
}% |
| 124 |
\def\stylel@t{% |
| 125 |
\let\bodynumbers=\topcentered |
| 126 |
\vsize 8.3in |
| 127 |
\raggedright |
| 128 |
\p@geclear% set page number |
| 129 |
\largetype\singlespace |
| 130 |
\parindent 0em |
| 131 |
\baselineskip 2.7ex |
| 132 |
\parskip\medskipamount |
| 133 |
}% |
| 134 |
\long\def\everyletter#1{\def\l@tterbody{#1}}\everyletter{}% |
| 135 |
\def\letter{% |
| 136 |
\let\resd@c\resl@t |
| 137 |
\let\pred@c\prel@t\let\styled@c\stylel@t\let\titd@c\titl@t |
| 138 |
\let\frontd@c\frontl@t\let\endd@c\endl@t\lettertrue |
| 139 |
}% |
| 140 |
\def\beginletter{\letter\begindocument}% |
| 141 |
\def\endletter{\enddocument}% |
| 142 |
\def\frontl@t{}% |
| 143 |
\def\resl@t{\endpage}% |
| 144 |
\def\prel@t{\beginbody}% |
| 145 |
\def\titl@t{% |
| 146 |
\topinsert |
| 147 |
\ifwindowenvelope |
| 148 |
\translate{-.0in}{-1.5in}{% |
| 149 |
\ifx\@ddress\empty\else |
| 150 |
\vbox to 1.in{% |
| 151 |
\singlespace\baselineskip 2.7ex\vss |
| 152 |
\halign to 4.35in{\tabskip\z@ |
| 153 |
##\hss\tabskip\z@ plus 1fil\cr\@ddress\crcr |
| 154 |
}\vss |
| 155 |
}% |
| 156 |
\fi |
| 157 |
}% |
| 158 |
\nointerlineskip |
| 159 |
\fi |
| 160 |
\l@tterhead |
| 161 |
\endinsert |
| 162 |
\fr@nttrue |
| 163 |
\rightline{\l@tterdate}\vskip\the\baselineskip |
| 164 |
\tempfalse |
| 165 |
\ifx\M@Ref\empty\else\temptrue\fi\ifx\Y@urRef\empty\else\temptrue\fi |
| 166 |
\iftemp |
| 167 |
\rightline{% |
| 168 |
\vbox{% |
| 169 |
\singlespace\halign{##\hfil\cr\M@Ref\Y@urRef}% |
| 170 |
}% |
| 171 |
}% |
| 172 |
\par |
| 173 |
\fi |
| 174 |
\vfil |
| 175 |
\vskip\lettertopskip |
| 176 |
\ifwindowenvelope\vskip1.20in\else |
| 177 |
\ifx\@ddress\empty\else |
| 178 |
{%\singlespace\indent |
| 179 |
\hbox{\vbox{\halign{##\hfil\cr\@ddress\crcr}}}% |
| 180 |
}% |
| 181 |
\par |
| 182 |
\vskip2\parskip |
| 183 |
\fi |
| 184 |
\fi |
| 185 |
\par\pr@\par |
| 186 |
\ifx\@ddressee\empty\else |
| 187 |
\medskip\s@lutation\ \@ddressee\par\medskip |
| 188 |
\fi |
| 189 |
}% |
| 190 |
\def\endl@t{% |
| 191 |
\l@tterbody |
| 192 |
\par |
| 193 |
\ifx\s@ndername\empty\else |
| 194 |
\nobreak\vskip 4.5ex% |
| 195 |
\line{% |
| 196 |
\hbox to .51\hsize{\hfil}\hskip\z@ minus 1fil |
| 197 |
\vbox{\singlespace\baselineskip 2.7ex% |
| 198 |
\halign{##\hfil\cr\cl@sing\cr\noalign{\nobreak\vskip.4in}% |
| 199 |
\s@ndername \crcr |
| 200 |
}% |
| 201 |
}% |
| 202 |
\hskip\z@ plus 1fill |
| 203 |
}% |
| 204 |
\fi |
| 205 |
{\normalbaselines |
| 206 |
\ifx\s@nderinitials\empty\else |
| 207 |
\par\s@nderinitials\t@pist\par |
| 208 |
\fi |
| 209 |
\@ncl |
| 210 |
\c@pies |
| 211 |
{\singlespace\p@st\par}% |
| 212 |
}% |
| 213 |
\vfil\eject |
| 214 |
\gdef\t@pist{}\gdef\c@pies{}\gdef\M@Ref{}\gdef\Y@urRef{}% |
| 215 |
\gdef\pr@{}\gdef\p@st{}% |
| 216 |
\letterfalse |
| 217 |
}% |
| 218 |
\newdimen\h@ght\h@ght=1in |
| 219 |
\newdimen\l@tterheadsize\l@tterheadsize\hsize |
| 220 |
\def\letterhead#1#2#3#4{% |
| 221 |
\def\l@tterhead{% |
| 222 |
\ifletterhead |
| 223 |
\l@tterheadsize\hsize\advance\l@tterheadsize0in |
| 224 |
\centerline{% |
| 225 |
\vbox{\hsize\l@tterheadsize |
| 226 |
\centerline{\vbox{\halign{####\hfil\cr#1\crcr}}}% |
| 227 |
\line{% |
| 228 |
\singlespace\baselineskip 2.7ex% |
| 229 |
\vbox to \h@ght{\vss\halign{####\hfil\cr#2\crcr}\vss}% |
| 230 |
\hss |
| 231 |
\vbox to \h@ght{\vss\halign{####\hfil\cr#3\crcr}\vss}% |
| 232 |
}% |
| 233 |
}% |
| 234 |
}% |
| 235 |
\else#4\fi |
| 236 |
}% |
| 237 |
}% |
| 238 |
\newif\ifletterhead\letterheadtrue |
| 239 |
\newif\ifstreetaddress |
| 240 |
\newif\ifwindowenvelope |
| 241 |
% review all of the \letterto's by typesetting them plus |
| 242 |
\def\p@genumberletter{% |
| 243 |
\p@gebanner{\l@tterdate}{}{Page\qquad\numorroman\p@gecount}% |
| 244 |
}% |