(This is the result of running 'labelnation --help') LabelNation, version 1.182 LabelNation is a program for making labels. By "label", I mean address labels, business cards, or anything else involving regularly-arranged rectangles on a printer-ready sheet. You can even use it to make a calendar (that took some work, though). Here's the basic concept: you tell LabelNation what text you want on each label (i.e., each rectangle). You can specify plain lines of text, or even arbitrary PostScript code. You also tell it what kind of labels it should print for. LabelNation takes all this information and produces a PostScript file, which you then send to your printer. Of course, you'll need a PostScript printer (or a PostScript filter, such as GNU GhostScript), and a sheet of special peel-off label paper in the tray. Such paper is widely available at office supply stores. Two companies that offer it are Avery Dennison (www.averydennison.com) and Maco (www.maco.com). This is not a recommendation or an endorsement -- Avery and Maco are simply the names I've seen. PostScript viewing software also helps, so you can see what your labels look like before you print. How To Use It: ============== Let's start with return address labels. If you wanted to print a sheet of them using the Avery 5167 standard (80 small labels per page), you might invoke LabelNation like this: prompt$ labelnation -t avery5167 -i myaddress.txt -l -o myaddress.ps The "-t" stands for "type", followed by one of the standard predefined label types. The "-i" means "input file", that is, where to take the label data from. The "-l" stands for "lines input", meaning that the format of the incoming data is lines of text (as opposed to PostScript code). The "-o" specifies the output file, which you'll print to get the labels. Here is a sample label lines file: J. Random User 1423 W. Rootbeer Ave Chicago, IL 60622 USA Note that the indentation is significant -- the farther you indent a line, the more whitespace will be between it and the left edge of the label. Three spaces is a typical indentation. Also note that blank lines are significant -- they are printed like any other text. You can have as many lines as you want on a label; fonts will be automatically scaled down if there are too many lines to fit using the default font size. How To Print A Variety Of Addresses: ==================================== An input file can also define many different labels (this is useful if you're running a mailing list, for example). In that case, instead of iterating one label over an entire sheet, LabelNation will print each label once, using as many sheets as necessary, leaving the unused remainder blank. To print many labels at once, you must pass a delimiter with the "-d" flag. The delimiter separates each label from the next. For example, if you use a delimiter of "XXX", then you might invoke LabelNation like so prompt$ labelnation -d "XXX" -t avery5167 -l -i addrs.txt -o addrs.ps where addrs.txt contains this J. Random User 1423 W. Rootbeer Ave Chicago, IL 60622 USA XXX William Lyon Phelps III 27 Rue d'Agonie Paris, France XXX (remember that all my examples are indented three spaces in this help message, so the content above is actually indented only three spaces in the file, while the XXX delimiters are not indented at all). How To Discover The Predefined Label Types: =========================================== To see a list of all known label types, run prompt$ labelnation --list-types Predefined label types: Avery-5160 / Avery-6245 / Maco-LL5805 (30 labels per page) Avery-5167 / Maco-LL8100 (80 labels per page) [etc...] Note that when you're specifying a label type, you can omit the capitalization and the hyphen (or you can leave them on -- LabelNation will recognize the type either way). A bit farther on, you'll learn how to define your own label types, in case none of the built-in ones are suitable. What To Do If The Text Is A Little Bit Off From The Labels: =========================================================== Printers vary -- the label parameters that work for me might not be quite right for your hardware. Correcting the problem may merely be a matter of adjusting the bottom and/or left margin (that is, the distance from the bottom or left edge of the page to the first row or column, respectively). The two options to do this are prompt$ labelnation --bottom-margin N --left-margin N ... where N is a number of PostScript points, each being 1/72 of an inch. (Of course, you don't have to use the two options together, that's just how it is in this example.) The N you specify does not add to the predefined quantity, but rather replaces it. In order to know where you're starting from, you can ask LabelNation to show you the parameters for a given label type: prompt$ labelnation -t avery5167 --show-parameters LeftMargin 14 BottomMargin 17 LabelWidth 126 LabelHeight 36 HorizSpace 22.5 VertSpace 0 HorizNumLabels 4 VertNumLabels 20 FontName Times-Roman FontSize 7 The first two parameters are usually the only ones you need to look at, although the others may come in handy when you're defining your own parameter files. Which brings me to the next subject... How To Print Labels That Aren't One Of The Predefined Standards: ================================================================ Use the -p option to tell LabelNation to use a parameter file. A parameter file consists of lines of the form PARAMETER VALUE PARAMETER VALUE PARAMETER VALUE ... You can see valid parameter names by running prompt$ labelnation -t avery5167 --show-parameters as mentioned earlier (it doesn't have to be avery5167, it can be any built-in type). Keep in mind that a "parameter file" is for specifying the dimensions and arrangement of the labels on the sheet, *not* for specifying the content you want printed on those labels. How To Use Arbitrary Postscript Code To Draw Labels: ==================================================== If your input file contains PostScript code to draw the label(s), instead of lines of label text, then pass the "-c" (code) option instead of "-l". The PostScript code will be run in a translated coordinate space, so 0,0 is at the bottom left corner of each label in turn. Also, clipping will be in effect, so you can't draw past the edges of a label. Normally, you will have to experiment a lot to get things just right. You can still print multiple, different labels at once -- delimiters work just as well in code files as in linetext files. One user reported that he had to do some trickery to get encapsulated PostScript to work right: From: Simon Wood Subject: RE: Graphical Labels with labelnation. To: "'kfogel@red-bean.com'" Date: Mon, 20 May 2002 08:54:57 +0100 I managed to get some really simple graphics in last year (for a crop of plum chutney). I'll send you the files from home. The image was created in Dia and then exported to '.eps'. The trick was to remove the header from the '.ps', run labelnation to size and position the images and then manually re-insert the header into the start of 'labelnation.ps'. How To Report A Bug: ==================== Check http://www.red-bean.com/labelnation/ to make sure you have the latest version (perhaps your bug has been fixed). Else, email . Copyright: ========== LabelNation: command-line label printing Copyright (C) 2000 Karl Fogel This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Predefined label types: 4 labels per page: Avery-5168 6 labels per page: Avery-5264 10 labels per page: Avery-5263, 5663, 5963, 8163 20 labels per page: Avery-5161, 5261, 5661, 5961 14 labels per page: Avery-5162, 5262, 5662, 5962, 8162, 8252, 8462, 15162, 18162, 18662 30 labels per page: Avery-5160, 5260, 5660, 5960, 5970, 5971, 5972, 5979, 5980, 6241, 6460, 6245, 8660 Maco-LL5805 80 labels per page: Avery-5167, 5267, 5667, 6467, 8167 Maco-LL8100 10 bcards per page: Avery-5371, Maco-LL8550 16 labels per page: Avery-7162 32 labels per page: Avery-6571 21 labels per A4 page: Avery-7160 24 labels per A4 page: Avery-7159 65 labels per A4 page: Avery-2651 8 labels per 10" page: Avery-2160, Maverick-ST340817 Remember to include the brand when specifying a label type; for example, say "avery-5979" not "5979". Options: -h, --help, --usage, -? Show this usage --version Show version number --explain Show instructions (lots of output!) --list-types Show all predefined label types -t, --type TYPE Generate labels of type TYPE -p, --parameter-file FILE Read label parameters from FILE -i, --infile Take input from FILE -l, --line-input Infile contains label text lines -c, --code-input Infile contains PostScript code -d, --delimiter DELIM Labels separated by DELIM --show-bounding-box Print rectangle around each label (recommended for testing only) --first-label N Start printing at label number N (bottom left is 1, count up each column in turn, top right is last) --font-name NAME Use PostScript font FONT --font-size SIZE Scale font to SIZE -o, --outfile FILE Output to FILE ("-" means stdout)