Document Classesletter | Creating Labels

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
arobase
Posts: 33
Joined: Sat Apr 14, 2012 7:46 pm

letter | Creating Labels

Post by arobase »

I wonder what is the purpose of \makelabels. Below, it adds a page after the letter with RECIPIENT in the top left corner. I was hoping I there would something like \DeclareOption{enveloppe-format} and that SENDER and RECIPIENT print where they're supposed to in that envelope format. That's 240mm×150mm, in my case, which, I think is 'A10' based on this https://en.wikipedia.org/wiki/Envelope# ... ican_sizes.

Code: Select all

\documentclass{letter}
\usepackage[english]{babel}
\usepackage{marvosym} %\Mobilefone %\fax %\email
\usepackage{wasysym} %\phone
\DeclareOption{a4paper}
%\DeclareOption{letterpaper}

\telephone{333-333-3333}
\signature{SENDER}
\name{SENDER} % I guess
\address{FROM ADDRESS}
\makelabels

\begin{document}
\begin{letter}{RECIPIENT}

\opening{Sir:}

I should be grateful if you would send me data regarding \dots

\closing{Sincerely,}

\end{letter}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

letter | Creating Labels

Post by localghost »

The \makelabels command is intended to format labels which are printed on stickers later. You can introduce more than one letter within your document with the letter environment. The page which is appended to the letters contains the labels in a 2×6 matrix (two columns, six rows), filling at first the left column and then the right one. It has the format as specified in the options for the document class.

By the way, you should not determine the paper size by the \DeclareOption command but better by the corresponding option for the document class as suggested in every beginners guide (see below).

Code: Select all

\documentclass[11pt,a4paper]{letter}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{lipsum}     % for dummy text, to be dropped in the actual document

\telephone{333-333-3333}
\signature{John}
\address{Home\\ \phone\ \telephonenum}

\makelabels

\begin{document}
  \begin{letter}{Peter\\Street\\City, State}
    \opening{Sir:}

    \lipsum[1]

    \closing{Sincerely,}
  \end{letter}


  \begin{letter}{Paul\\Street\\City, State}
    \opening{Sir:}

    \lipsum[2]

    \closing{Sincerely,}
  \end{letter}


  \begin{letter}{Mary\\Street\\City, State}
    \opening{Sir:}

    \lipsum[3]

    \closing{Sincerely,}
  \end{letter}
\end{document}
For printing envelopes there are dedicated packages [1]. And you should think about using another class to get rid of the restrictions of the standard »letter« class.

[1] The TeX Catalogue Online, Topic Index — Business Cards, Labels and Envelopes


Thorsten
Post Reply