; ; ; ; Locate position of cursor on page when printed on Apple LaserWriter. ; WARNING: The entire file must be in memory! ; start laser :laser 'cmode 'text "fetch dsk0:adobe.xsb[7,20]^m" 'rtn 'key g go for it 'xcall adobe,copytable 'message xbuf 'rtn %define cp 'text %0 'text ^i 'text %1 'text ^m endm ; ; format of each table entry ;      cp "copyfile","points leading position-offset" :copytable '%cp "crt","6.55 0 19.65" '%cp "crtend","9 1 13.10" '%cp "crtcut","9 1 6.55" '%cp "crttop","6.55 0 0" '%cp "crtbot","9 1 13.10" ; calculate size of text 'map ts..font,20 'map ts..avg,10                  ; average character width 'map ts..size,10                 ; approximate point size 'map ts..width,10 'map ts..less,10 'map ts..more,10 'map ts..true,10 'do textsize 'crt eos 'crt 7 2 print "------------------------------------------------------------------------" crlf print "              SuperVUE/LaserWriter Text Size Calculation" 'input 12  "   Enter font (Courier, Helvetica, or Times) : " 'ts..font=xbuf 'input 13  "                Enter approximate point size : " 'ts..size=xbuf 'input 14 "                     Enter Width (in inches) : " 'ts..width=xbuf*72 'crt 16 2 print "------------------------------------------------------------------------" crlf 'ts..avg=0.45 'xvar ts..font 'range cc CC             ; just check first character of font name 'ifeq (ts..avg=0.60 'endif ; Columns = Width / (Points * AvgCharWidth) 'ts..less=ts..size*ts..avg 'ts..less=ts..width/ts..less 'ts..more=ts..less 'acc=ts..less 'fix 0 'ts..less=acc            ; compute INT(ts..less) 'cmpnum ts..less,ts..more 'ifne (ts..more=ts..less+1 'endif 'print " Use "; 'call truewidth 'cmpnum ts..less,ts..more 'ifne (ts..less=ts..more (print "  Or "; (call truewidth 'endif 'display-pos 'rtn ; display true width truewidth: 'acc=ts..less 'fix 0 'ts..less=acc            ; compute INT(ts..less) 'print ts..less;" column ruler with "; ; Points = Width / (Columns * AvgCharWidth) 'ts..true=ts..less*ts..avg 'ts..true=ts..width/ts..true 'print ts..true;" point text." 'rtn