summaryrefslogtreecommitdiff
path: root/macros/plain/contrib/misc/labelmac3.tex
blob: 17c68a7a4270e8255d57ba2d0dddbdf8677b7302 (plain)
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
%% Save file as: LABELMAC3.TEX          Source: FILESERV@SHSU.BITNET  
%% Posted by bharat@herodotus.cs.uiuc.edu (R. Bharat Rao)
%% to comp.text.tex on 11 Oct 91 03:16:48 GMT
%% THIS IS A PLAIN TeX FILE
%% To use ...
%% 
%% \input labelmac3
%% \address{
%% address 1
%% 
%% }
%% .... (repeat 29 more times)

% This is set up to use Avery 5160 labels for laser printers.
% The label size is 1 inch by 2 and five eights inches.
\newif\ifcentyorn
\centyorntrue
\newdimen\fullhsize
\fullhsize=8.20in \hsize=2.625in
\vsize=11.0in
\def\fullline{\hbox to\fullhsize}
\hoffset=-.68in
\voffset=-.365in
\let\lr=L \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{\makeheadline
    \fullline{\box\leftcolumn\hfil\box\midcolumn\hfil\columnbox}
    \makefootline}
  \advancepageno}
\def\columnbox{\leftline{\pagebody}}
\def\makeheadline{\vbox to 0pt{\vskip-22.5pt
    \fullline{\vbox to8.5pt{}\the\headline}\vss}\nointerlineskip}
\def\makefootline{\baselineskip=24pt \fullline{\the\footline}}

\def\endoflabels{\supereject
         \if L\lr \else\null\vfill\eject\fi
         \if L\lr \else\null\vfill\eject\fi
      \end}
\obeylines\gdef\address#1{\setbox0\vbox{#1}
	\vbox to 71.90pt{\ifcentyorn\vss\fi \box0 \vss}}

%\obeylines\gdef\address#1{\setbox0\vbox{#1} \vbox to 71.90pt{ \box0 \vss}}

%\font\labelfont=cmbx7
%\font\labelfont=cmtt8
\font\labelfont=cmss9
\parindent=0pt
\raggedright
\raggedbottom
%\nopagenumbers
\interlinepenalty=1000
\labelfont
%