[texhax] price labels templates

tom sgouros tomfool at as220.org
Mon Nov 1 23:27:54 CET 2004

Below is a file I got from somewhere for mailing labels, which
sounds like what you need.  I didn't write it, but I use it, and
modified it a bit.  The only problem I find is that for easy mailing I
wish the labels were sorted in columns instead of rows.


 tomfool at as220 dot org

% label.tex, Russell Brown (rbrown at ms.uky.edu)

% Change the "\input filename" to whatever you call your
% particular file

% The following is a format for printing mailing labels. To use, set
% the following six dimensions, 
% \nrows = number of rows
% \ncols = number of columns
% \vcorner= vertical distance from top of page to top of first label
% \hcorner = horizontal distance from left edge of page to left edge of label
% \hlabel = horizontal width of label
% \vlabel = vertical height of label
% \hfudge = correction to make the horizontal alignment to work out correctly
% \vfudge = correction to make the vertical alignment to work out correctly
% These last two lengths require some experimenting.
% To type the labels, use the macro \lb which takes one argument, the
% entire address with lines separated by \\. 
% Example \lb{line1 \\line2\\line3}
% If a label has too many lines,
% it will throw off the alignment of subsequent labels.  
% In practice, you will want vcorner and hcorner to be larger than the
% physical corner in order that the address is not put right at the
% edge of the label.

%%%%%%%%%%%%%%%%%%%%%%%%%%  USER DEFINED LENGTHS %%%%%%%%%%%%%%%%%%%%%%
% Everything else is computed using these 6 quantities.


% \newcount\nrows\newcount \ncols

\nrows=10               %Number of rows
\ncols=03               %Number of columns.     

\newdimen\vcorner \newdimen\hcorner 
\newdimen\vlabel \newdimen\hlabel

% 2.6in was empirically determined to work with Avery 5160 labels, on
% my Canon BJ-200, 1/2/02
\vcorner = 2.55in        % vertical distance between upper left corner
                        % of page and upper left corner of first label 
\hcorner = 0.3in       % Horizontal distance between page and first
                        % label.

\vlabel  = 1.0in        % Height of label.
\hlabel  = 2.7in        % width of label.

\newdimen \vfudge \newdimen \hfudge
\vfudge = -0.11 in      % experimentally determined quantity which is
                        % addedto vlabel to obtain physical
                        % spacing equal to vlabel. It turns out to
                        % equal the height of a line.
\hfudge = -0.25in

\newdimen \tempp
\tempp = \hcorner 
\advance\tempp by -1.125in
\setlength{\oddsidemargin}{\tempp} % physical margin = \..sidemargin + 1.25in

\tempp = \hlabel  \advance \tempp by 0.2in
\multiply \tempp by \ncols 

\tempp=\vcorner \advance \tempp by -1.60in
\setlength{\topmargin}{\tempp}% Physical margin = \topmargin +1.5 in

\tempp = \vlabel \multiply\tempp by \nrows 

                                % \showthe \textheight\showthe \textwidth
\setlength{\fboxsep}{0in}       %% needed for boxes to come out right
                                %% hgt

\advance \vlabel by \vfudge
\advance \hlabel by \hfudge

\fill 0.1in
\mbox{          \rule[-\vlabel]{0in}{\vlabel} %distance between labels is
                                        %1 in+height of 1 line.
                        {\sf #1}




More information about the texhax mailing list