Take the 2-minute tour ×
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'm trying the make labels with the package envlab, in order to print them on Avery label-stickers paper. So far it's all good, except that there is an unwanted space at the top of the page. I don't know if it comes from the envlab package or the letter class (needed by envlab). This space (whose height is unknown) creates an offset which break the alignment of the labels regarding the actual sticker-paper.

Here is a minimal working example to show the problem. I've set the top margin to 0mm so that the problem is visible. The actual top margin should be 21.6mm, and be the same at the top and bottom of the page (2x21.6+6x42.3= 297mm, the height of A4 paper).

\documentclass[12pt,a4paper]{letter}
\usepackage[nocapaddress]{envlab}
\usepackage{multido}
\SetLabel 
  {97mm}  % width
  {42.3mm}  % height
  {0mm} % top margin
  {7.5mm}  % left margin
  {7.5mm}     % inter-label gap + right margin
  {2}       % columns
  {6}       % rows
\makelabels % Tell envlab to make labels in the document.

%%make a very thin box around the labels
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{0.005pt}
\renewcommand{\PrintLabel}[1]{\fbox{\parbox[t][\LabelHeight][t]{\LabelWidth}{\PrintAddress{#1}}}}

%%original \PrinLabel command from envlab.sty
%\renewcommand{\PrintLabel}[1]{\parbox[t][\LabelHeight][t]{\LabelWidth}{\PrintAddress{#1}}}

\begin{document}%
\startlabels%
\multido{\i=1+1}{12}{%
\mlabel{}{%
    givenname surname {\i}\\
    Address line \\
    postalcode \\
    Country
}}
\end{document}

Does someone know where this space comes from ?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

I don't know where this spaces comes from, but it seems to be 11.5pt.

Adding the command

\voffset-11.5pt

in the preamble removes it.

MWE (I've changed \fboxrule for displaying purposes, change it back in your document)

\documentclass[12pt,a4paper]{letter}
\usepackage[nocapaddress]{envlab}
\usepackage{multido}
\voffset-11.5pt
\SetLabel
  {97mm}  % width
  {42.3mm}  % height
  {0mm} % top margin
  {7.5mm}  % left margin
  {7.5mm}     % inter-label gap + right margin
  {2}       % columns
  {6}       % rows
\makelabels % Tell envlab to make labels in the document.

%%make a very thin box around the labels
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{0.4pt} % change it back to 0.005pt
\renewcommand{\PrintLabel}[1]{\fbox{\parbox[t][\LabelHeight][t]{\LabelWidth}{\PrintAddress{#1}}}}

%%original \PrinLabel command from envlab.sty
%\renewcommand{\PrintLabel}[1]{\parbox[t][\LabelHeight][t]{\LabelWidth}{\PrintAddress{#1}}}

\begin{document}%
\startlabels%
\multido{\i=1+1}{12}{%
\mlabel{}{%
    givenname surname {\i}\\
    Address line \\
    postalcode \\
    Country
}}
\end{document} 

Output:

enter image description here

share|improve this answer
    
It does the job, thank you! I did come to a comparable workaround by using the envlab hook \def\@beginlabelpagehook{\vspace*{-20.2pt}\relax}. As you can see the required length to compensate the gap is higher, although -11.5pt is definitely the right value for voffset. Strange... –  Adam B. Feb 1 at 20:02
add comment

Your Answer

 
discard

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.