home *** CD-ROM | disk | FTP | other *** search
- # jgreely@cis.ohio-state.edu, 89/10/23
- #
-
- # this is the normal prolog, and defines everything used below
- #
- prolog=
- /inch {72 mul} def
- /moveU {0 11 inch translate} def
- /moveR {8.5 inch 0 translate} def
- /moveD {0 -11 inch translate} def
- /moveL {-8.5 inch 0 translate} def
- /rotR {-90 rotate} def
- /rotL {90 rotate} def
- /doSpiral {moveU moveR rotR 0.67 dup scale} def
- /moveHU { 0 5.5 inch translate} def
- /doRevSpiral {moveHU rotL 0.67 dup scale} def
- .
-
- # up is a synonym for twoup, since my code doesn't work correctly for
- # the case n==1. Until I robustify it, this will stay.
- #
- name=up
- modulus=2
- scale=7.75 inch 0 translate rotL 11 17 div dup scale
- 1=
- 2=moveR
- .
-
- name=2up
- modulus=2
- scale=7.75 inch 0 translate rotL 11 17 div dup scale
- 1=
- 2=moveR
- .
-
- # two-up with even pages rotated, for double-siding
- #
- name=pup
- modulus=2
- even=moveU moveR rotR rotR
- odd=
- scale=7.75 inch 0 translate rotL 11 17 div dup scale
- 1=
- 2=moveR
- .
-
- # note that 4up is scaled a bit smaller than you might think. If I
- # just scaled by .5, I'd lose my top and bottom edges (printer
- # limitations)
- #
- name=4up
- modulus=4
- scale=0.2125 inch 0.275 inch translate 0.475 dup scale
- 1=moveU
- 2=moveR
- 3=moveL moveD
- 4=moveR
- .
-
- # this does a greeting-card format, designed to be folded into
- # fourths. If you're not sure how it's supposed to look, run:
- # makeup 4 | up -n card | lpr
- #
- name=card
- modulus=4
- scale=0.2125 inch 0.275 inch translate 0.475 dup scale
- 1=moveU moveU moveR rotR rotR
- 2=moveU moveU moveR rotR rotR
- 3=moveR
- 4=moveU moveU moveR rotR rotR
- .
-
- # this is about the limit for a 300 dpi device, unless it's reasonably
- # new and you have good eyes. I like it at 400 dpi.
- #
- name=6up
- modulus=6
- scale=0.25 inch 0.75 inch translate rotL 4 11 div dup scale
- 1=moveD
- 2=moveR
- 3=moveR
- 4=moveD moveL moveL
- 5=moveR
- 6=moveR
- .
-
- # this is a bit too far for casual reading. It's entering magnifying
- # glass territory, which is bad, unless you need to carry lots of RFCs
- # around.
- #
- name=8up
- modulus=8
- scale=0.7 inch 0 translate rotL 11 34 div dup scale
- 1=moveD
- 2=moveR
- 3=moveR
- 4=moveR
- 5=moveD moveL moveL moveL
- 6=moveR
- 7=moveR
- 8=moveR
- .
-
- # Steve Romig's contribution to evil PostScript hacking. To see what
- # it does, run:
- # makeup 10 | up -n spiral | lpr
- #
- name=spiral
- modulus=10
- scale=7.75 inch 0 translate rotL 11 17 div dup scale
- 1=
- 2=doSpiral
- 3=doSpiral
- 4=doSpiral
- 5=doSpiral
- 6=doSpiral
- 7=doSpiral
- 8=doSpiral
- 9=doSpiral
- 10=doSpiral
- .
-
- # More from Steve, this time in the other direction
- #
- name=revspiral
- modulus=10
- scale=7.75 inch 0 translate rotL 11 17 div dup scale
- 1=moveR
- 2=doRevSpiral
- 3=doRevSpiral
- 4=doRevSpiral
- 5=doRevSpiral
- 6=doRevSpiral
- 7=doRevSpiral
- 8=doRevSpiral
- 9=doRevSpiral
- 10=doRevSpiral
- .
-
- # this is not legible on anything under 400 dpi, and even then you'll
- # probably want a magnifying glass. You *can* read it with the naked
- # eye, but not for long.
- #
- name=16up
- modulus=16
- scale=0.25 0.25 scale
- 1=moveU moveU moveU
- 2=moveR
- 3=moveR
- 4=moveR
- 5=moveD moveL moveL moveL
- 6=moveR
- 7=moveR
- 8=moveR
- 9=moveD moveL moveL moveL
- 10=moveR
- 11=moveR
- 12=moveR
- 13=moveD moveL moveL moveL
- 14=moveR
- 15=moveR
- 16=moveR
- .
-