[TriLUG] A challenge: 8,000 serial number labels
Andrew Perrin
aperrin at email.unc.edu
Sat Sep 29 11:56:14 EDT 2001
Greetings.
For a study, I need a lot of little stickers printed with serial
numbers: 800 numbers, 10 stickers each. I'm using Avery 5167 labels, which
are 1/2" x 1 3/4", 80 to a sheet (4 across by 20 down). The challenge: to
get the numbers lined up with the labels.
My thought was to use LaTeX and the envlab style; I wrote a quick perl
script that generated the document, then used pdflatex to make a pdf
file. It *seemed* to work fine; I got 100 pages of serial numbers in
vertical blocks of 10, just as I wanted.
However, unfortunately for some reason the numbers don't line up with the
labels on the sheet, although (I think) I've configured envlab correctly
for them. Appendix A at the bottom of this message is the perl script,
which includes the envlab \SetLabel declaration.
So, finally, the question: using LaTeX, or ANY other tool (I'll even hold
my nose and do Windows if necessary), can anyone suggest a tactic to get
these printed? I am really not happy about manually typing 8,000 numbers,
which I think would be necessary using the label templates in StarOffice,
Word, etc.
Thanks, in advance, for any advice.
---Appendix A: sn.pl---
#!/usr/local/bin/perl -w
use strict;
print <<END;
\\documentclass{letter}
\\usepackage[nocapaddress,noprintbarcodes]{envlab}
\\SetLabel{2in}{0.5in}{.5in}{.75in}{.25in}{4}{20}
\\makelabels
\\begin{document}
\\startlabels
END
for (my $i = 101 ; $i <= 900 ; $i += 4) {
my $j = $i + 1;
my $k = $i + 2;
my $l = $i + 3;
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{$i}\\mlabel{}{$j}\\mlabel{}{$k}\\mlabel{}{$l}\n";
print "\\mlabel{}{}\\mlabel{}{}\\mlabel{}{}\\mlabel{}{}\n";
}
print "\\end{document}\n";
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
More information about the TriLUG
mailing list