lout-users
[Top][All Lists]
Advanced

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

Designing labels (business cards w/ Debian)


From: Robert Cymbala
Subject: Designing labels (business cards w/ Debian)
Date: Sat, 09 Jun 2001 21:02:42 -0700

Below is a "bundle" of four files which taken together print some
business cards (works on Avery Laser 5377 stock).  Output from the
bundle is this Postscript file:

  http://www.lafn.org/~cymbala/Gnug/gnug_bc_20010609.ps

Thanks to Greg A. Woods for posting a similar example back in April,
and thanks to Mark G. Sobell's _PRACTICAL GUIDE TO LINUX_ for the
bundle method.


HOW TO UN-BUNDLE and EXECUTE:

 1. from line "# To unbundle, sh this file" to end of this email,
    put lines into file "gnug_bc.bundle".

 2. put "gnug_bc.bundle" into a subdirectory that does _NOT_ already
    have file "mydefs".

 3. change these two (2) paths to match your working subdirectory:
     2 lines matching "\"/home" in buffer *mail*.
        43:@SysInclude { "/home/cymbala/Gnug/gnug_bc_doc" }
        71:@SysInclude { "/home/cymbala/Gnug/gnug_bc" }
    
 4. un-bundle:
     sh gnug_bc.bundle

 5. execute lout:
     lout -S /home/cymbala/Gnug/gnug_bc.lout > /home/cymbala/Gnug/gnug_bc.ps

-RjC
-- 
# To unbundle, sh this file
echo gnug_bc.lout 1>&2
cat >gnug_bc.lout <<'End of gnug_bc.lout <Sat Jun  9 22:08:40 PDT 2001>'



#  For business cards.
#                                 Time-stamp: <2001-06-09 22:08:38 cymbala>
#
#  See "gnug_bc_doc" for how to fine-tune margins.
#
#  Bundle needed for cards (from Mark G. Sobell, PRACTICAL GUIDE, pg 395):
#         sh bundle   gnug_bc.lout mydefs gnug_bc_doc gnug_bc
#         > gnug_bc.bundle
#
@SysInclude { "/home/cymbala/Gnug/gnug_bc_doc" }
@SysInclude { mydefs }
@Doc @Text @Begin

    @PageHeight @High @PageWidth @Wide {
        @Tab
            hmargin { @TabHMargin }
            @Fmta   { @Col A ! @Col B }                         {
            @Rowa A { @GnuBusinessCard } B { @GnuBusinessCard }
            @Rowa A { @GnuBusinessCard } B { @GnuBusinessCard }
            @Rowa A { @GnuBusinessCard } B { @GnuBusinessCard }
            @Rowa A { @GnuBusinessCard } B { @GnuBusinessCard }
            @Rowa A { @GnuBusinessCard } B { @GnuBusinessCard } }   }
@End @Text
# Local variables:
#   tab-width:4
# End:
End of gnug_bc.lout <Sat Jun  9 22:08:40 PDT 2001>
echo mydefs 1>&2
cat >mydefs <<'End of mydefs <Sat Jun  9 22:08:40 PDT 2001>'
# /home/cymbala/myrefs
#
#   Lout "myrefs"
#   Time-stamp: <2001-06-07 18:04:25 cymbala>

@SysInclude { tab }
import @DocumentLayout

@SysInclude { "/home/cymbala/Gnug/gnug_bc" }

###
#
End of mydefs <Sat Jun  9 22:08:40 PDT 2001>
echo gnug_bc_doc 1>&2
cat >gnug_bc_doc <<'End of gnug_bc_doc <Sat Jun  9 22:08:40 PDT 2001>'
#
# Time-stamp: <2001-06-09 21:51:41 cymbala>
# From: /usr/lib/lout/include/doc

@SysInclude { fontdefs  } # font definitions
@SysInclude { langdefs  } # language definitions
@SysInclude { dl        } # DocumentLayout package
@SysInclude { docf      } # OrdinaryLayout extension
@Include    { mydefs    }

@Use { @DocumentLayout
  @PageType                     { Letter @OrIfPlain Other }
  # page type (width, height)

  @TopMargin                    { 1.95c  @OrIfPlain 6f    }
  # top margin of all pages
  @FootMargin                   { 0.05c  @OrIfPlain 6f    }
  # bottom margin of all pages

  @OddLeftMargin                { 1.03i   @OrIfPlain 10s   }
  # left margin of odd pages
}

@Use { @OrdinaryLayout }
@SysDatabase @RefStyle { refstyle }     # reference printing styles
###
#
End of gnug_bc_doc <Sat Jun  9 22:08:40 PDT 2001>
echo gnug_bc 1>&2
cat >gnug_bc <<'End of gnug_bc <Sat Jun  9 22:08:40 PDT 2001>'
#
# ~/Gnug/gnug_bc
# Time-stamp: <2001-06-09 21:51:38 cymbala>

# Based upon post by Greg A. Woods (with changes for Debian):
#   Re: Designing labels
#     From: address@hidden (Greg A. Woods)
#     Date: Mon, 6 Nov 2000 15:58:46 -0500 (EST)
#     Resent-Sender: address@hidden
#     http://snark.ptc.spbu.ru/mail-archives/lout/latest/msg01674.html

def @PersonFirstname     { " Rob" }
def @PersonLastname      { "Cymbala" }
def @PersonMi            { "J." }
def @PersonEmailA        { " address@hidden " }
def @PersonEmailB        { "address@hidden" }
def @PersonURL           { "www.lafn.org/~cymbala" }
def @PersonVoicePhone    { " 213) 365-0960" }
#
def @Gnug_FictitiousName { "GNU Guidance" }
def @Gnug_SloganOne      { "  Linux  Installation" }
def @Gnug_SloganTwo      { "  Linux  Training" }
def @Gnug_PhraseOne      { 
                           @Bullet "  Runs  80386  PCs  and  up" }
def @Gnug_PhraseTwo      { 
                           @Bullet "  LA  Free-Net  ($40 /year)" }
def @Gnug_PhraseThree    { 
                           @Bullet "  10+  years  with  UNIX" }


def @PageHeight  { "10.2i"  }
def                              @PageWidth   { "8.0i"   }
def @CardHeight  { "3.0i"   }
def                              @CardWidth   { "1.92i"  }

# Change this to adjust horizontal alignment.
# Change this and OddLeftMargin (in opposite directions) to adjust
# horizontal alignment of one column but _not_ the other.
def @TabHMargin { "0.25i"   }


# Pg 107: '@Wide should be used only to reduce the width of the wider
# columns, not to increase the width of the narrower ones.'
def @vmargin_onev { "0.15v" }

# *****************************************************************************
def @GnuBusinessCard {
    @CardWidth @High @CardHeight @Wide {
        @Tab
            vmargin { @vmargin_onev }
            @Fmta { @Col                      H               @Over X }
            @Fmtb { @Col 2.5c @Wide  9p @Font A ! @Col 9p @Font @RR B }
            @Fmtc { @Col 3.0c @Wide 13p @Font A ! @Col B }
            @Fmtd { @Col                      A ! @Col              B }
            @Fmte { @Col                      H               @Over X }

            {       
            @Rowa
                below { single }
                vmargin { 0.15ix }
                H {
                    { 18p } @Font @Gnug_FictitiousName
                }
            @Rowa
                H { @Null }

            @Rowb
                vmargin { 0.25v }
                A { 3p @Font " " }
            @Rowb
                A { @Gnug_SloganOne }
                B { @Gnug_PhraseOne }
            @Rowb
                vmargin { @vmargin_onev }
                A { @Gnug_SloganTwo }
                B { @Gnug_PhraseTwo }
            @Rowb
                A { }  B { @Gnug_PhraseThree }
            @Rowb
                A { }  B { }

            @Rowc
                vmargin { 0.2v }
                A { @PersonFirstname { } @PersonLastname { } }
                B { "" }

            @Rowd
                A { { Courier Base 8p } @Font     @PersonEmailA }
                B { { Courier Base 9p } @Font @RR @PersonVoicePhone
                }

            @Rowe
                H { { 10p } @Font {
                    ""
                } }
        }
    }
}
# Local variables:
# mode:lout
# tab-width:4
# End:
End of gnug_bc <Sat Jun  9 22:08:40 PDT 2001>


reply via email to

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