1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Autoletter -- TeX Procedure
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Author: E. V. Bell, II
% Department of Physics and Astronomy
% University of Kansas
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% V1.1
% This TeX file is designed to take a file with a list of of names
% and a file with the text of a form letter and will process a letter
% for each name.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\input letter_format
\message{+------------------------------------------+}
\message{| AutoLetter Version 1.1 -- 9 October 1986 |}
\message{+------------------------------------------+}
\newread\addressfile
\message{Enter name of file containing the addresses:}
\read-1 to\addfile
\openin\addressfile=\addfile
\message{Enter name of file containing the body of the letter:}
\read-1 to\letfile
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Now read in an entry containing the person to whom to send the letter
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\endlinechar=-1
\read\addressfile to\text \let\title=\text
\loop
\read\addressfile to\text \let\firstname=\text
\read\addressfile to\text \let\nickname=\text
\read\addressfile to\text \let\middlename=\text
\read\addressfile to\text \let\lastname=\text
\read\addressfile to\text
\ifx\text\blank\def\jr{}\else\def\jr{, \text}\fi
\endlinechar='015
\message{Now processing letter to \addressee.}
\getaddress
\doletter
\endlinechar=-1
\read\addressfile to\text \let\title=\text
\ifeof\addressfile\endfalse\else\endtrue\fi
\ifend
\repeat
\bye
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Author: E. V. Bell, II
% Department of Physics and Astronomy
% University of Kansas
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% V1.2
% This file is to be used in the production of form letters.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\input KUBasic
\twelvept
\hsize=6.5truein
\vsize=8.0truein
\hoffset=1.0truein
\voffset=1.5truein
\raggedbottom
\interlinepenalty=1000
\parindent=0pt
\parskip=0pt
\nopagenumbers
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Define some stuff so that the headlines will come out the way
% we want them to be.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\newbox\headbox
\headline={\ifnum\pageno>1
{\twelverm
\global\setbox\headbox=\vbox\bgroup%
\leftline{\addressee}
\leftline{\today}
\leftline{Page \folio}\egroup}\copy\headbox
\else\hfil\fi}
\def\makeheadline{\vbox to 0pt{\vskip-70.6pt
\line{\vbox to30.6pt{}\the\headline}\vss}
\nointerlineskip}
\newif\ifend
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Macros for reading in the address from the file.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\blank{}
\def\endletter{\endmode\vfill\eject\pageno=1}
\newdimen\longindentation \longindentation=10truecm
\newbox\theaddress
\newif\ifast
\def\aster{* }
\def\getaddress{{\global\setbox\theaddress=\vbox\bgroup\raggedright%
\hsize=\longindentation
\everypar{\hangindent2em}
\line{\vbox to10.2pt{}\addressee\hss}\egroup%
{\loop{\read\addressfile to\text
\ifx\text\aster\astfalse\else\asttrue\fi
\ifast\global\setbox\theaddress=\vbox\bgroup\unvbox\theaddress
\line{\vbox to 10.2pt{}\text\hss}\egroup}\repeat}}}
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Macros for formatting the letter.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\letterbody{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
#2
{#1\nobreak\bigskip \leftskip=\longindentation #2
\nobreak\bigskip\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}
P.~S.\ }
\def\address{\beginlinemode \copy\theaddress \endgroup}
\def\doletter{{\leftskip=\longindentation%
\rm\today\bigskip\address\bigskip}
\input \letfile}
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Macros for setting up forms of salutation.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\mr{Mr.}
\def\ms{Ms.}
\def\mrs{Mrs.}
\def\miss{Miss}
\def\addressee{\ifx\blank\title\else\title\space\fi%
\firstname\space\ifx\blank\middlename\else\middlename\space\fi%
\lastname\jr}
\def\person{\ifx\blank\title Sir or Madam\else\title\space\lastname\fi}
\def\familiar{\ifx\blank\nickname \firstname\else\nickname\fi}
\def\formal{\ifx\mr\title Sir\else{\ifx\ms\title Madam\else%
{\ifx\mrs\title Madam\else{\ifx\miss\title Madam\else{\person}\fi}%
\fi}\fi}\fi}
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Labels -- TeX Procedure
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Author: E. V. Bell, II
% Department of Physics and Astronomy
% University of Kansas
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% V1.0
% This TeX file is designed to take a file with a list of of names
% process a label for each name.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\input label_format
\message{+----------------------------------------+}
\message{| Labels Version 1.0 -- 29 December 1986 |}
\message{+----------------------------------------+}
\newread\addressfile
\message{Enter name of file containing the addresses:}
\read-1 to\addfile
\openin\addressfile=\addfile
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Now read in an entry containing the person to whom to send the letter
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\endlinechar=-1
\read\addressfile to\text \let\title=\text
\loop
\read\addressfile to\text \let\firstname=\text
\read\addressfile to\text \let\nickname=\text
\read\addressfile to\text \let\middlename=\text
\read\addressfile to\text \let\lastname=\text
\read\addressfile to\text
\ifx\text\blank\def\jr{}\else\def\jr{, \text}\fi
\endlinechar='015
\message{Now processing label for \addressee.}
\getaddress
\dolabel
\endlinechar=-1
\read\addressfile to\text \let\title=\text
\ifeof\addressfile\endfalse\else\endtrue\fi
\ifend
\repeat
\bye
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% TeX Master: E. V. Bell, II
% Department of Physics and Astronomy
% University of Kansas
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% V1.2
% This file contains the formatting macros for the LABELS procedure.
% The macros in this file are based on some provided from a TeXhax
% submission by Ted Shapin, Beckman Instruments, Fullerton, CA, on
% December 18, 1986. They can be used to produce mailing labels from
% a name and address file of the form that AUTOLetter uses. The format
% is 33 labels per 8-1/2 x 11 inch page. (EVB II, 12/29/86)
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% This output routine does a triple column page with no headers or
% footers. Taken from the TeXbook. (TS, 12/18/86)
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\input KUBasic
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Set up the page sizes and other dimensions.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\newdimen\fullhsize
\hsize=2.8225truein
\fullhsize=8.5truein
\vsize=11.0truein
\hoffset=0.25truein
\voffset=-0.175truein
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Set up output routine.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\fulline{\hbox to \fullhsize}
\let\lr=L
\def\columnbox{\leftline{\pagebody}}
\newbox\leftcolumn
\newbox\midcolumn
\output={\if L\lr
\global\setbox\leftcolumn=\columnbox
\global\let\lr=M \else
{\if M\lr \global\setbox\midcolumn=\columnbox
\global\let\lr=R \else
\tripleformat \global\let\lr=L\fi}\fi
\ifnum\outputpenalty>-20000 \else\dosupereject\fi}
\def\tripleformat{\shipout\vbox to\vsize{
\fulline{\box\leftcolumn\hfil\box\midcolumn\hfil\columnbox}}
\advancepageno}
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Set up stuff so that there is no top offsets, offsets between lines,
% paragraphs, etc.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\parindent=0pt\topskip=0pt\lineskip=0pt plus .4pt\parskip=0pt
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Macros for reading in the address from the file.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\blank{}
\newbox\theaddress
\newif\ifast
\def\aster{* }
\newif\ifend
\def\getaddress{{\global\setbox\theaddress=\vbox\bgroup\raggedright%
\everypar{\hangindent2em}
\line{\vbox to10.2pt{}\addressee\hss}\egroup%
{\loop{\read\addressfile to\text
\ifx\text\aster\astfalse\else\asttrue\fi
\ifast\global\setbox\theaddress=\vbox\bgroup\unvbox\theaddress
\line{\vbox to 10.2pt{}\text\hss}\egroup}\repeat}}}
\def\address{\beginlinemode \copy\theaddress \endgroup}
\def\dolabel{\vbox to1.0truein{\vfil\hbox to\hsize{\hfil\address\hfil}\vfil}}
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
% Macros for setting up the addressee's name.
%::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
\def\addressee{\ifx\blank\title\else\title\space\fi%
\firstname\space\ifx\blank\middlename\else\middlename\space\fi%
\lastname\jr}
|