W3cubDocs

/LaTeX

\makelabels

Synopsis:

\makelabels   % in preamble

Optional, for a document that contains letter environments. If you just put \makelabels in the preamble then at the end of the document you will get a sheet with labels for all the recipients, one for each letter environment, that you can copy to a sheet of peel-off address labels.

Customize the labels by redefining the commands \startlabels, \mlabel, and \returnaddress (and perhaps \name) in the preamble. The command \startlabels sets the width, height, number of columns, etc., of the page onto which the labels are printed. The command \mlabel{return address}{recipient address} produces the two labels (or one, if you choose to ignore the return address) for each letter environment. The first argument, return address, is the value returned by the macro \returnaddress. The second argument, recipient address, is the value passed in the argument to the letter environment. By default \mlabel ignores the first argument, the return address, causing the default behavior described in the prior paragraph.

This illustrates customization. Its output includes a page with two columns having two labels each.

\documentclass{letter}
\renewcommand*{\returnaddress}{Fred McGuilicuddy \\
                               Oshkosh, Mineola 12305}
\newcommand*\originalMlabel{}
\let\originalMlabel\mlabel
\def\mlabel#1#2{\originalMlabel{}{#1}\originalMlabel{}{#2}}
\makelabels
  ...
\begin{document}
\begin{letter}{A Einstein \\
               112 Mercer Street \\
               Princeton, New Jersey, USA 08540}
  ...
\end{letter}
\begin{letter}{K G\"odel \\
               145 Linden Lane \\
               Princeton, New Jersey, USA 08540}
  ...
\end{letter}
\end{document}

The first column contains the return address twice. The second column contains the address for each recipient.

The package envlab makes formatting the labels easier, with standard sizes already provided. The preamble lines \usepackage[personalenvelope]{envlab} and \makelabels are all that you need to print envelopes.

© 2007–2018 Karl Berry
Public Domain Software
http://latexref.xyz/_005cmakelabels.html