我正在尝试使用带有以下代码的“标签”包,据我了解文档,它应该可以工作:
\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}
但是,我收到错误消息LeftBorder
,RightBorder
和TopBorder
是BottomBorder
未定义的控制序列。但是LabelCols
和LabelRows
已定义,因此应该找到该包。
pdflatex -v
说pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016/NixOS.org)
;不确定如何找出安装了哪个版本的标签。
答案1
您可以放弃newdimen
选项:
\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}
或者使用适当的参数:
\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}
\LabelSetup
两种情况,如果在 之后指定参数,则应调用\begin{document}
。如果在 之前指定,则无需添加\LabelSetup
。
(来源:文档)