labels − groff label macros
groff −m labels [ files. . . ]
Use the labels macros to print onto pre-cut labels. Version 0.6 includes the following predefined labels:
avery5160 — address labels
avery5199S — video spine labels
avery5199F — video face labels
The labels macros are fairly simple: use the Label macro to specify a pre-defined label type, define a macro to print your label, and use the Fill or FillPage macros to make as many labels as you need.
The following macros are available:
Specifies a pre-defined label type. See the list at the beginning of this document for the supported types. Use this macro before any other labels macros.
FillPage macro [n]
Print n pages of labels using the specified macro. You can omit n to print a single page.
Fill macro row col n
Print n labels starting at row and col. Row and column numbers start with 1. Use this macro to print a partial sheet; if you request more labels that can fit on a page, groff stops at the last label on the page. You may find this macro handy for using up the last labels on partial sheets (video labels are hideously expensive).
Generates vertical space such that a label containing n lines of text should be centered vertically in the label.
The following macros may be useful for debugging a new label type.
Move to row n. Row numbers start with 0.
Move to column n. Column numbers start with 0.
The following is an example label definition (actually avery5199F):
.nr lbl_ROWS 5 Number of rows
on the page
.nr lbl_COLS 2 Number of labels per row
.nr lbl_TopMar 2.3c Space to the top of the first label
.nr lbl_LeftMar 2.8c Space to the left of the first label
.nr lbl_Width 7.8c Width of each label
.nr lbl_Height 4.65c Height of each label
.nr lbl_ColGap 0.6c Gap between columns, if any
.ll (u;\n[lbl_Width]) Makes centering work right
The number registers shown above completely define the behavior of the labels macros. If you create a new label definition file, place it in the tmac/labels directory and it will be available to the Label macro.
The entire set of groff requests are available for creating label macros. Label macros are not limited to static output repeated on each label. For example, a macro could print a sequence number at the bottom of each label, or read an address from stdin.
No known bugs.
The labels macro names are designed for use with groff and will not work with traditional (legacy) troff.
The file std.adjust, in the tmac/labels directory, should be used to calibrate a printer. Currently, that functionality is not implemented.
More label definitions are certainly needed.
Larry Kollar (firstname.lastname@example.org))