0

I am trying to use the "labels" package with the following code, which should, as far as I understand the documentation, work:

\documentclass[a4paper,12pt]{article}
\usepackage[newdimens]{labels}

\begin{document}

\begin{labels}
\LabelCols=3%         Number of columns of labels per page
\LabelRows=7%         Number of rows of labels per page
\LeftBorder=8mm%      Space added to left border of each label
\RightBorder=8mm%     Space added to right border of each label
\TopBorder=9mm%       Space to leave at top of sheet
\BottomBorder=2mm%    Space to leave at bottom of sheet


  bla
  blubb


  quiek
  nilpferd
\end{labels}

\end{document}

However, I get the error messages that LeftBorder, RightBorder, TopBorder and BottomBorder are undefined control sequences. LabelCols and LabelRows are defined however, so the package should be found.

pdflatex -v says pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/NixOS.org); not sure how to find out what version of labels is installed.

1

You can either drop newdimen option:

\documentclass[a4paper,12pt]{article}
\usepackage{labels}

\begin{document}

    \begin{labels}
        \LabelCols=3%         Number of columns of labels per page
        \LabelRows=7%         Number of rows of labels per page
        \LeftBorder=8mm%      Space added to left border of each label
        \RightBorder=8mm%     Space added to right border of each label
        \TopBorder=9mm%       Space to leave at top of sheet
        \BottomBorder=2mm%    Space to leave at bottom of sheet
        \LabelSetup


        bla
        blubb


        quiek
        nilpferd
    \end{labels}

\end{document}

Or use the appropriate parameters:

\documentclass[a4paper,12pt]{article}
\usepackage[newdimens]{labels}


\begin{document}
    \begin{labels}

\LabelCols=3% Number of columns of labels per page
\LabelRows=7% Number of rows of labels per page
\LeftPageMargin=7mm% These four parameters give the
\RightPageMargin=7mm% page gutter sizes. The outer edges of
\TopPageMargin=15mm% the outer labels are the specified
\BottomPageMargin=15mm% distances from the edge of the paper.
\InterLabelColumn=2mm% Gap between columns of labels

\InterLabelRow=0mm% Gap between rows of labels
\LeftLabelBorder=5mm% These four parameters give the extra
\RightLabelBorder=5mm% space used around the text on each
\TopLabelBorder=5mm% actual label.
\BottomLabelBorder=5mm%

        \LabelSetup


        bla
        blubb


        quiek
        nilpferd
    \end{labels}

\end{document}

Both cases, you should call \LabelSetup if you specify the parameters after \begin{document}. If you specify them before, you don't have to add \LabelSetup.

(Source: pages 3-4 of the documentation)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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