2 # Center pages and put cropmarks at each corner. Physical page size
3 # is set with -w and -h. The default is 8.5 by 11.0 inches. Device
4 # dependent code to change paper size (e.g. with setpageparams) goes
5 # in the prologue. You may need to customize the device dependent
6 # code that we distribute. By default it only supports variable page
7 # sizes on Linotronic typesetters, and assumes those typesetters are
8 # using 12 inch wide paper. Use -d to disable execution of device
9 # dependent PostScript code.
11 # What's here was written quickly and will likely be very different
12 # in our next release. It should be part of a more general program!!
15 POSTLIB=/sys/lib/postscript/prologues
16 PROLOGUE=$POSTLIB/cropmarks.ps
27 BEGINSETUP=%%BeginSetup
30 while (! ~ $#* 0 && ~ $1 -*) {
32 case -d; EXPANDPAGE=false
34 case -h; shift; PAGEHEIGHT=$1
35 case -h*; PAGEHEIGHT=`{echo $1 | sed s/-h//}
37 case -s; SCALETOFIT=true
39 case -w; shift; PAGEWIDTH=$1
40 case -w*; PAGEWIDTH=`{echo $1 | sed s/-w//}
42 case -x; shift; XOFFSET=$1
43 case -x*; XOFFSET=`{echo $1 | sed s/-x//}
45 case -y; shift; YOFFSET=$1
46 case -y*; YOFFSET=`{echo $1 | sed s/-y//}
48 case -L; shift; PROLOGUE=$1
49 case -L*; PROLOGUE=`{echo $1 | sed s/-L//}
53 case -*; echo '$0: illegal option $1' >[1=2]; exit 1
63 echo 'CropmarkDict begin'
64 echo '/pageheight '$PAGEHEIGHT' def'
65 echo '/pagewidth '$PAGEWIDTH' def'
66 echo '/expandpage '$EXPANDPAGE' def'
67 echo '/scaletofit '$SCALETOFIT' def'
68 echo '/xoffset '$XOFFSET' def'
69 echo '/yoffset '$YOFFSET' def'