                       Making Labels
                        Gary Perlman

I am  pleased to  announce public  release of  my new  label
program.  This program takes  label-lines and lays them  out
for transfer onto  label master  sheets.   Although hard  to
believe, there  is a  lot  of technical  information  behind
printing labels, and this document will help you.

                        Definitions

Label Master Sheets:  These are  8.5 X 11  inch sheets  with
self-adhesive labels.  The sheets are designed for  jam-free
photocopy transfer  from printed  sheets.   There  are  many
sizes of  label master  sheet  layouts.   Here at  the  Wang
Institute, we have two:

                Across Sheet           Top-to-Bottom
            #labels  #characters     #labels    #lines
    small      3         33             11        6
    big        2         50              5       12

The  number   of  available   characters  assumes   12-pitch
printing, or  100 characters  per  line.   This is  how  our
Diablo printer is  set up.   For  small labels,  there is  a
character not accounted for (3 labels times 33 characters is
99, not 100 characters).  This missing character is  cleaned
up in a shell script, small_label, that sets all the options
needed for small-label master sheets.  For big labels, there
are three lines at the top  of the page, and three lines  at
the bottom (5 labels  times 12 lines is  60, not 66  lines).
These  extra  lines  are  cleaned  up  in  a  shell  script,
big_label, that sets  all the options  needed for  big-label
master sheets.

Label Layout: A label  master sheet is  a matrix of  labels,
while  a   set  of   label   description  lines   comes   in
line-by-line.  The goal of  the label program is to  arrange
the labels so  that they  fit on  the labels  on the  master
sheet.  For labels numbered 1  to 9 to fit on a  small-label
master sheet, that means the labels should be arranged  like
this:
	1	2	3	
	4	5	6
	7	8	9

Label-Lines: The input to the  label program is a series  of
lines, each with one label per line.  But because each label
is several lines, a special character, the field  delimiter,
must be used  to separate  different lines  within a  label,
called fields.  By default, this character is the colon (:),
but it can be changed to  another character if a colon  must
appear in a label line.  An example label-line is:

  G. Perlman:Wang Institute:Tyng Road:Tyngsboro, MA 01879

There are four fields  in this label.   Two copies of  this
label, spanning this page width, would look like this:

  G. Perlman                    G. Perlman
  Wang Institute                Wang Institute
  Tyng Road                     Tyng Road
  Tyngsboro, MA 01879           Tyngsboro, MA 01879

Note that there is  a blank line at  the top of the  labels,
and that each label is indented two spaces.

                         Aesthetics

Although small labels  have 6 lines  and 33 characters,  and
big labels  have 12  lines and  50 characters,  not all  the
label is usable.  It is  common practice to leave the  first
(few) and last (few) lines of  a label clear, and to  indent
the text on labels at least  one or two spaces.  This  looks
better, and it  makes the  alignment of text  on the  labels
less critical.  The big_label and small_label shell  scripts
assume that upper and left margins are wanted on all labels.

                         Pragmatics

To make some labels, here is what you do, step by step.

First, you must type  in your labels, one  per line, in  the
format described above.  Let's  assume your labels are in  a
UNIX file called "mylabels".

Second, you must decide what sort of labels you want, big or
small.  For most  address labels, the  small labels are  too
small, so the big ones should be used.  For labels like name
tags, the small labels are okay.

Third, you put  your labels through  the label program,  or,
more likely, through  one of the  convenient shell  scripts:
small_label or big_label.   Let's  assume you  will use  the
big-label master sheets.  The call to big_label (that is  an
underscore between big and label) would look like this:
                     big_label mylabels

But that would  just print  the labels out  on your  screen,
which is not very useful.   So you can save the output  from
the label program in  a file, which  we'll assume is  called
"mysheet":
                big_label mylabels > mysheet

Fourth, print the formatted label  sheet on a printer,  like
the Diablo printer.   The printer should be  set up so  that
printing will start in the extreme upper left hand corner of
the page.  The print command would look like this:
                    lpr -Pdiablo mysheet

Note that the steps to make the labels and print them can be
combined using UNIX  pipes.  This  also avoids creating  the
file "mysheet" which serves no useful purpose.  The combined
command would be:
             big_label mylabels | lpr -Pdiablo

Fifth, take the printed label  sheet and transfer it onto  a
sheet of self-adhesive labels.  These  can be hand fed in  a
photocopy machine, or stacked into the paper feed bin.   The
sheets are specially made  to not jam  up the copy  machine.
Because the Diablo printer often has alignment problems, the
printed sheet may have to be adjusted a bit to match up with
the self-adhesive label master sheet.

                           Frills

The label program  has several  options, many  of which  are
used in the  shell scripts  big_label and  small_label.   In
this section, I will  discuss the options  you may are  most
likely to use.  All these options can be used with the shell
scripts, or with the label  program directly.  First,  there
is a -U option,  that will give you  a usage summary of  the
program (with the current options) so that:
                       small_label -U
will print:
	label: format label sheet
	-c      center fields on each label line
	-d C    field delimiter character (:)
	-h N    height in lines of labels (6 lines)
	-i N    indent before each label (2 spaces)
	-l N    number of label across page (3)
	-n N    repeat each label N times (1 times)
	-s N    skip lines at label top (1 lines)
	-U      print this usage message
	-w N    label width (33 spaces)

The center option (-c)  will center all  the fields on  each
line of the printed labels.  This is pretty on labels  other
than address labels.  The  -n option tells label the  number
of times to print each label.  By default, label prints  one
copy, but sometimes more  than one is  wanted, such as  when
you want to  fill a sheet  with one label  to have a  stock.
Here is an example using the -c and the -n options:

               small_label -c -n 33 copyright

where the file "copyright" contains one label:

   Copyright (c) 1985:Wang Institute:All Rights Reserved

A two-column two copy version of this label to fit this page
would look like this:
                  label -l 2 -w 30 -c -n 2

       Copyright (c) 1985            Copyright (c) 1985
         Wang Institute                Wang Institute
      All Rights Reserved           All Rights Reserved
