Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to make stickers for envelopes. Each sticker would contain data about one recipient of the letter. I would like to be able to have this data in some text format (CSV) and that LaTeX would take it and format it for printing, of multiple stickers on one page. Is there a package for something like this? Is there some other efficient way to do it?

share|improve this question

1 Answer 1

up vote 12 down vote accepted

The envlab package is perhaps the best choice for labels themselves. In combination with datatool this can be very powerful. I've written a demo on this for the UK-TUG pages: summarising here, the LaTeX file is

  {63.5mm}  % width
  {38.1mm}  % height
  {15.15mm} % top margin
  {7.75mm}  % left margin
  {2mm}     % inter-label gap
  {3}       % columns
  {7}       % rows
\makelabels % Tell envlab to make labels in the document.
\makeatletter % We need to access some internal commands
\newcommand*{\IfDataT}[1]{% Create a macro taking one argument
    \expandafter\@gobble % Empty input: ignore the next thing
        \@gobble % NULL input: ignore the next thing
        \@firstofone % Use the next thing unchanged
\newcommand*{\IfDataTF}[1]{% Create a macro taking one argument
    \expandafter\@secondoftwo % Empty value: use the False branch
        \@secondoftwo % NULL value: use the False branch
        \@firstoftwo % A real value: use the True branch


    \title\IfDataT\title{~}\firstname\unskip\ \lastname\\
    \addressI \\ 
    \addressII \IfDataT\addressII\\
    \addressIII \IfDataT\addressIII\\
      \postcode \IfDataT\postcode{~}\town\\
      \town \\
      \postcode \\        
} %

with a database such as

Miss,Alison,Smith,1 The Street,,,SomeTown,AB1 2XY,,
Mr,Ben,Jones,2 The Close,SmallVillage,,OtherTown,AB2 4XY,,
Mr,Chris,Brown,Housename,The Main Street,OddVillage,BigTown,AB3 6XY,,
Dr,From,Abroad,456 Foreign Stra{\ss}e,Place-en-Conti\'nent,,Townii,2341R,NotInUK,

The code I've added on top of the basics here is used to 'pretty print' addresses: you might not need all of it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.