lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

example mailing return address labels for Avery #05160(tm)


From: Greg A. Woods
Subject: example mailing return address labels for Avery #05160(tm)
Date: Sat, 12 Oct 2002 18:05:16 -0400 (EDT)

Here's what I ended up with after converting my old "@Tab" labels to "@Tbl".

These print reasonably well on my Apple LaserWriter 16/600PS on sheets
of Avery #05160(tm) labels.

The hardest part was learning that struts cause enormous problems when
you're trying to pack cells together vertically as close as possible for
something tiny like an address label.

There are still some things that confuse me about table margins though.
For instance note the "WEIRD" comment in the main grouping table that
forms the page of labels.  The vertical gap between the columns of
labels on the sheet is 1/8", but there's no horizontal gap between them.

Eg:

    +--------+ +--------+ +--------+
    |        | |        | |        |
    +--------+ +--------+ +--------+
    |        | |        | |        |
    +--------+ +--------+ +--------+
... for a total of ten rows of labels ...
    +--------+ +--------+ +--------+
    |        | |        | |        |
    +--------+ +--------+ +--------+

At first I assumed the margin would have to be split between left and
right sides of the cell so would have to be 1/16" (0.0625i).  However
that didn't work -- the columns were still each cumulatively 1/16" too
close together.

Also confusing is that when I print with the grouping table having rules
enabled I see no gap:

    +---------+---------+---------+
    |         |         |         |
    +---------+---------+---------+
    |         |         |         |
    +---------+---------+---------+
... for a total of ten rows of labels ...
    +---------+---------+---------+
    |         |         |         |
    +---------+---------+---------+

I.e. the cells are wider but there's no gap between them.

The above character representation pretty much shows what happens on the
page too.  The first column is exactly the right width.  The left-most
vertical line aligns with the label such that with the right page margin
there's 1/16" gap over to the label cut line and the next vertical line
lies almost in the centre of the gap over to the next column.  However
the third vertical line then lines up with the cut line on the right of
the second column, and the fourth line is to the left of the right-side
cut line.  If I adjust the page margin such that the left-most line is
right on the cut line, then the right-most line on the right-most cut
line too (and only the middle labels are exactly centred).

The only way I could think to express the gap between the labels without
trying to use vertical margins would be to make it a real column, but
that seems way too complex.  Is there not a way to do this with @Tbl
directly?

#! lout -a -s
#
#       Planix return-address mail labels.
#
# PostScript output suitable for printing on Avery #05160 label paper
# can be produced from this document with:
#
#       lout -a -s -o mail-return-labels.ps mail-return-labels.lout
#
#ident "@(#)p-samples:$Name$:$Id$"

#
# parameters for personalising your labels:
#
def @CompanyName        { "Planix, Inc" }
def @CompanyEmail       { "address@hidden" }
def @CompanyStreetAddr  { "181 Dawlish Ave." }
def @CompanyCityProv    { "Toronto, Ontario" }
def @CompanyPostalCode  { "M4N 1H6" }
def @CompanyCountry     { "Canada" }
#
# These next four probably shouldn't be changed much without also accounting
# for the changes in the @CompanyLabel table layout too....
#
# LargeName has the letters concatenated so that @HAdjust will spread
# them apart to exactly fill the width of the @CompanyLabel table.
#
def @CompanyLargeName   { P | L | A | N | I | X }
def @CompanyName        { "Planix, Inc." }
def @CompanySloganOne   { @UNIX @Char emdash Internet @Char emdash Security 
@Char emdash Administration }
def @CompanySloganTwo   { Consulting @Char emdash Training @Char emdash 
Programming @Char emdash Design }

#  @SysInclude commands for standard packages required for this doc.
#
@SysInclude { langdefs }        # language definitions
@SysInclude { bsf }             # BasicSetup package
@SysInclude { dsf }             # DocumentSetup package
@SysInclude { docf }            # OrdinarySetup extension to DocumentSetup
@SysInclude { tbl }             # @Tbl -- the table formatter

import @BasicSetup
def @UNIX { @S Unix }
import @BasicSetup
def @Unix { @S Unix }
import @BasicSetup
def @unix { @S Unix }

# some handy tools:
#
import @BasicSetup
def @Code
        right x
{
        @F lines @Break x
}

@Use { @BasicSetup
        @InitialFont    { Times Base 6p }
        @InitialBreak   { 0.1fx }

        @DisplayGap     { 0.0v }        # gap above, below displays
        @ParaGap        { 0.0v }        # gap between paragraphs
        @ListGap        { 0.0v }        # gap between list items
}

@Use { @DocumentSetup

        @PageType       { Letter }      # page type (sets width, height)

        @TopMargin      { 0.5i }        # top margin of all pages
        @FootMargin     { 0.0c }        # bottom margin of all pages

        @OddLeftMargin  { 0.1875i }     # left margin of odd pages
        @OddRightMargin { 0.001i }      # right margin of odd pages

        @EvenLeftMargin { 0.1875i }     # left margin of even pages
        @EvenRightMargin { 0.001i }     # right margin of even pages

        # Note that the margin marks should line up exactly with the
        # outside label edges... (i.e. they are the outside cut marks)
        #
        @PageBackground { @BoundaryMarks
                                linewidth { 0.2p }
                                length { 0.25i }
                                gap { 0.1i }
                        }

        # this is a one-page "document" that mostly fills the printable area
        @PageHeaders    { None }

}

#
#  The @OrdinarySetup @Use clause - options specific to ordinary documents.
#

@Use { @OrdinarySetup
}


@SysDatabase @FontDef  { fontdefs }               # font definitions

def @CompanyLabel { 
        0.9375i @High 2.5i @Wide @Tbl

                # remove these named parameters when printing labels on
                # label paper:
#               rulewidth { 0.02f }                     # TESTING
#               rule { yes }                            # TESTING

                # kill the default separation of rows and columns...
                margin { 0.0i }
                marginabove { 0.0i }
                marginbelow { 0.0i }

                aformat {
                        @Cell
                                marginbelow { 0.03i }
                                indent { ctr } A
                }
                bformat {
                        @Cell
                                strut { no }            # otherwise 1f high cell
                                indent { ctr } B
                }
                cformat {
                        @Cell
                                strut { no }            # otherwise 1f high cell
                                marginabove { 0.03i }
                                indent { ctr } C
                }
        {       
                @Rowa
                        A {
                                # Why does @Wide need to be here????
                                2.25i @Wide @HAdjust {
                                        { Times Bold 24p } @Font 
@CompanyLargeName
                                }
                        }
                @Rowb
                        ruleabove { yes }
                        rulewidth { 0.03f }             # lighter than usual
                        marginabove { 0.015i }
                        B { 8p @Font @CompanySloganOne }
                @Rowb
                        marginbelow { 0.01i }
                        B { 8p @Font @CompanySloganTwo }
                @Rowc
                        C { 10p @Font @CompanyStreetAddr }
                @Rowc
                        C { 10p @Font { @CompanyCityProv "  " 
@CompanyPostalCode } }
                @Rowc
                        C { 10p @Font { @CompanyCountry " " @Code 
<@CompanyEmail> } }
        }
}

#
# Start of the document proper
#
@Document
        @InitialSpace   { troff }
        @InitialFont    { Times Base 10p }
//
@Text @Begin

8.125i @Wide 10i @High @Tbl

        margin { 0.0i }
        marginvertical { 0.0i }
        marginhorizontal { 0.125i }     # WEIRD: the label gap is 1/8"!

        # NOTICE:  remove these named parameters when printing labels on label 
paper:
#       rule { yes }                            # DRAFT

        aformat {
                @Cell
                        marginabove { 0.05i }
                        strut { no }
                        indent { ctr }
                        width { 2.75i }
                        height { 1i }
                        A |
                @Cell
                        marginabove { 0.05i }
                        strut { no }
                        indent { ctr }
                        width { 2.75i }
                        height { 1i }
                        B |
                @Cell
                        marginabove { 0.05i }
                        strut { no }
                        indent { ctr }
                        width { 2.75i }
                        height { 1i }
                        C
        }
{
        # there are ten rows of three columns of labels.

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }

@Rowa
        A { @CompanyLabel }
        B { @CompanyLabel }
        C { @CompanyLabel }
}
@End @Text


-- 
                                                                Greg A. Woods

+1 416 218-0098;            <address@hidden>;           <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]