%! % GONZO20A Guru Gonzo PostScript power tools (Interim release) % Includes gonzo justification and layout utilities. % Copyright c 1990,1996 by Don Lancaster and Synergetics, Box 809, % Thatcher Arizona, 5552 (520) 428-4073 don@tinaja.com support % via http://www.tinaja.com All commercial rights and all electronic % media rights **FULLY** reserved. Reposting is expressly forbidden. % this is a combined pagemaking and illustration package that is % extremely device independent, powerful, and flexible. But not wysiwyg %%%%%%%%%%%%%%%%%%%%%%%%%% % name of textfile: powertool.util % .... systemdict /setstrokeadjust known {true setstrokeadjust} if % last revision: September 1996 added cr/lf substitution /ps.util.1 {gutil} def % substitute old name /gutility {gutil} def % substitute old name /guru { gonzo begin ps.util.1 begin printerror nuisance begin} def % jumpstart 200 dict /gutil exch def gutil begin % A series of Don Lancaster Gonzo PostScript utilities that include: % (1) stepnrepeat - addressible step and repeat routines % (2) curvetrace - a powerful curve tracing routine % (3) rubbergrid - dropout-free gray layout/graphing grids % (4) line drawing - line drawing utilities % (5) electronics - electronic schematic icons for rubbergrid % (6) arcjustify - improved circletext routine with kerning % (7) fone elim - eliminates any need for end user fonts % (8) nuisances - single command replacements for complex stuff % (9) errortrap - printing error trapping routine % (10) gonzojust - gonzo justify package % ///// % (1) step and repeat % % Horizontal and vertical are defined AFTER selecting portrait or % landscape. Parameters (in points or true/false) are as follows... % % #horizrpts - times proc repeats in horizontal direction % #vertrpts - times proc repeats in vertical direction % hspacing - horizontal proc repeat spacing % vspacing - vertical proc repeat spacing % hstart - horizontal offset of first proc % vstart - vertical offset of first proc % ticklen - length of cropping ticks when and if used % useticks? - show the ticks true/false boolean % landscape - landscape orientation true/false boolean /stepnrptparams 40 dict def stepnrptparams begin /admitonetick [5 9 150 60 25 25 10 true true] def % 45 tickets /babybumper [2 10 270 72 40 30 20 true false] def % 20 stickers /badgeaminit [2 3 220 220 90 60 250 false false] def % 6 badges /bigbumpstick [1 3 792 205 0 0 40 true true] def % 3 bumperstickers /buscard [3 4 256 143 12 20 20 true true] def % 12 buscards /busenvelope [1 1 685 305 0 150 20 true true] def % 1 envelope /eightlabel [2 4 306 198 0 0 50 true false] def % 1/8 page /fulllandpage [1 1 0 0 20 20 50 false true] def % entire landscape page /fullportpage [1 1 0 0 20 20 50 false false] def % entire portrait page /lilbumpstick [1 5 610 150 0 20 60 true false] def % 5 blumperstickers /quadsplit [2 2 396 306 0 0 50 true true] def % 1/4 page /readerserv [12 25 25 -15 120 450 0 false false] def % 300 RS numabers /shiplabel [1 4 290 180 160 65 40 true false] def % 4 custom labels /sixlabel [2 3 306 264 0 0 50 true false] def % 1/6 page /stdplabel [1 11 254 74 185 5 20 true false] def % 11 stock dp labels /tenlabel [2 5 305 144 0 45 50 true false] def % 1/10 page /videospline [1 13 424 60.3 80 34 0 false false] def % 13 VHS splines /3.5disklabel [2 3 216 226 100 60 20 false false] def % 6 disk labels 3.5 /5.25disklabel [1 7 316 110 275 35 0 false false] def % 7 disk labels 5.25 end % /setrepeatparams is a working tool that extracts the selected repeat % values from an entry in stepnrptparams. /setrepeatparams {cvn stepnrptparams exch get aload pop /landscape1 exch def /ticktrue exch def /ticklen exch def /vertstart exch def /horstart exch def /incvert exch def /inchoriz exch def /numvert exch def /numhoriz exch def} def % /onetick optionally draws a single tick or crop mark, while /drawticks % puts one at each corner of each form /onetick { 0 ticklen 2 div rmoveto 0 ticklen neg rlineto ticklen 2 div neg dup neg rmoveto ticklen 0 rlineto 0 setlinewidth stroke} def /drawticks {gsave ticktrue {0 0 moveto onetick inchoriz 0 moveto onetick 0 incvert moveto onetick inchoriz incvert moveto onetick} if grestore}def % default variables used by stepnrpt /srexitproc {} def % default short exit - don't do it. /numpages 1 def % default number of sheets to print /startnum 0 def % initial ticket number /runnum startnum def % running pointer advances one per repeat /repeatproc {} def % artwork to get repeated default /customdata false def % autopaginate custom data? % /srfile gets used for custom entries. Each entry can be a string or a % proc, but ONLY ONE ENTRY is allowed per final repeat. /srfile [(You) (forgot) (to) (define) (srfile!)] def % default srfile % /calcpages is an optional routine that decides how many pages are % needed ONLY when you are using a custom srfile. This allows early % exits when or if you run out of data. /calcpages {dup cvn stepnrptparams exch get dup 0 get exch 1 get mul cvi srfile length exch div ceiling cvi /numpages exch def} def % This is the main stepandrepeat tool... /stepandrepeat { save /srsnap exch def mark exch /quickexit false def customdata {calcpages} if setrepeatparams numpages {gsave landscape1 {-90 rotate -792 0 translate} if horstart vertstart translate gsave numhoriz {gsave numvert {drawticks save /rptsave1 exch def repeatproc rptsave1 restore /runnum runnum 1 add def 0 incvert translate srexitproc} repeat quickexit {exit} if grestore inchoriz 0 translate} repeat quickexit {exit} if grestore showpage grestore} repeat quickexit {showpage} if cleartomark srsnap restore} def % To force an early exit when you run out of names or reach a given % ticket number, test suitably. Then conditionally make /quickexit % true and exit repeatproc. % Note that an ending showpage is NOT required and should NOT be used. % ////// % (2) curvetrace % . . . . . % curvetrace - creates a smooth curved path from a data point list. % enter with currentpoint set and absolute array. % 0 0 as initial data appends path; any other values % creates new path /curvetrace {/curvelist exch def tension 0 eq {/tension .000001 def} if curvelist length 3 div 1 sub cvi /#triads exch def /ptr 0 def firstpoint morepoint} def /tension 2.83 def % default value for best fit /showtick false def % don't show points /ticklen 15 def % length of ticks /tickhead ticklen 4 div def /prvx { curvelist ptr 3 sub get } def /curx { curvelist ptr get } def /prvy { curvelist ptr 2 sub get } def /cury { curvelist ptr 1 add get } def /prva { curvelist ptr 1 sub get } def /cura { curvelist ptr 2 add get 180 sub} def /showtic1 { showtick true eq {gsave currentpoint newpath translate cura 180 add rotate ticklen neg 2 div 0 moveto ticklen 0 rlineto tickhead neg dup rlineto tickhead dup rlineto tickhead dup neg exch rlineto 0 setlinewidth stroke 0 ticklen neg 2 div moveto 0 ticklen rlineto stroke grestore} if }def /firstpoint { curx cury 2 copy abs exch abs add 0 eq {pop pop currentpoint curvelist exch 1 exch put curvelist exch 0 exch put}{moveto} ifelse showtic1 /ptr ptr 3 add def}def /morepoint {#triads { curx prvx sub dup mul cury prvy sub dup mul add sqrt tension div /zdist exch def prva cos zdist mul prvx add prva sin zdist mul prvy add cura cos zdist mul curx add cura sin zdist mul cury add curx cury curveto showtic1 /ptr ptr 3 add def} repeat} def /showtick false def % ////////////////////////////////// % (3) Finegray Rubbergrid % . . . . . . % Creates fine gray grids without dropouts or rattiness. % The code shown is device specific for 300 dpi printers. % To create a grid, use -hpos- -vpos- -gridsize- setgrid % Until restored, all further images will be "locked" to % the grid and will expand and contract with it. Note that % optimum linewidths and font sizes will usually be much % less than 1.0 after locking. % To show a grid, use -#hlines- -#vlines- showgrid. % The seegrid command displays the grid when true. % The fat5 command emphasizes every fifth line when true. % the fatter10 command emphasizes every tenth line when true. % Here are the graphing grays. For most users most of the time, % select ggray4 or ggray5 as your default ggray. /ggray1 {/ggray{0 setgray} def}def /ggray2 {/ggray {150 0 {eq {1}{0} ifelse} setscreen 0.500 setgray} def} def /ggray3 {/ggray {100 0 {eq {1}{0} ifelse} setscreen 0.667 setgray} def} def /ggray4 {/ggray { 75 0 {eq {1}{0} ifelse} setscreen 0.750 setgray} def} def /ggray5 {/ggray { 60 0 {eq {1}{0} ifelse} setscreen 0.800 setgray} def} def /ggray6 {/ggray { 50 0 {eq {1}{0} ifelse} setscreen 0.833 setgray} def} def /ggray10 {/ggray { 30 0 {eq {1}{0} ifelse} setscreen 0.900 setgray} def} def /ggray15 {/ggray { 20 0 {eq {1}{0} ifelse} setscreen 0.933 setgray} def} def /ggray20 {/ggray { 15 0 {eq {1}{0} ifelse} setscreen 0.950 setgray} def} def /ggray30 {/ggray { 10 0 {eq {1}{0} ifelse} setscreen 0.966 setgray} def} def % pick a default working ggray /ggray {60 0 {eq {1}{0} ifelse} setscreen 0.800 setgray} def % keep grids unlocked except for Golly Gee Mr. Science!! uses requiring not % less than two exclamation points... /lockggrid false def % Don't unless really needed % gridlockcheck checks to see if an exact pixel lock is wanted for single % dot crossings. See note above. 51.7 = QMS PS820. Your machine may also % need "exception tuning" if it does not give you perfect one dot crossings. /gridlockcheck {lockggrid {gsave ggray currentscreen grestore pop pop /ggraynum exch def ggraynum 150 eq {3 1 roll transform 2 div round 2 mul exch 2 div round 2 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 2 div cvi 2 mul idtransform exch pop} if ggraynum 100 eq {3 1 roll transform 3 div round 3 mul exch 3 div round 3 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 3 div cvi 3 mul idtransform exch pop} if ggraynum 75 eq {3 1 roll transform 4 div round 4 mul exch 4 div round 4 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 4 div cvi 4 mul idtransform exch pop} if ggraynum 60 eq {3 1 roll transform 5 div round 5 mul exch 5 div round 5 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 5 div cvi 5 mul idtransform exch pop} if ggraynum 50 eq {3 1 roll transform 6 div round 6 mul exch 6 div round 6 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 6 div cvi 6 mul idtransform exch pop} if ggraynum 30 eq {3 1 roll transform 10 div round 10 mul exch 10 div round 10 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 10 div cvi 10 mul idtransform exch pop} if ggraynum 20 eq {3 1 roll transform 15 div round 15 mul exch 15 div round 15 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 15 div cvi 15 mul idtransform exch pop} if ggraynum 15 eq {3 1 roll transform 20 div round 20 mul exch 20 div round 20 mul version (51.7) eq {0.5 add } if exch itransform 3 -1 roll 0 exch dtransform 20 div cvi 20 mul idtransform exch pop} if }if} def /setgrid { gsave gridlockcheck /blocksize exch def translate blocksize dup scale setfontssmaller} def /thingridlines {0} def % can alter if you must magnify; but best 0 /showgrid {gsave ggray /vblocks exch def /hblocks exch def thingridlines setlinewidth [{0 0 moveto 0 vblocks rlineto stroke} 1 hblocks 1 add] xrpt [{0 0 moveto hblocks 0 rlineto stroke} 1 vblocks 1 add] yrpt fatterborder { gsave newpath 0 0.96 blocksize div dtransform round idtransform setlinewidth pop 2 setlinecap 0 0 moveto hblocks 0 rlineto 0 vblocks rlineto hblocks neg 0 rlineto closepath stroke grestore} if fat5 { gsave newpath 0 0.48 blocksize div dtransform round idtransform setlinewidth pop mark {5 0 moveto 0 vblocks rlineto stroke} 5 hblocks 5 div cvi] xrpt mark {0 5 moveto hblocks 0 rlineto stroke} 5 vblocks 5 div cvi] yrpt grestore} if fatter10 { gsave newpath 0 0.96 blocksize div dtransform round idtransform setlinewidth pop mark {10 0 moveto 0 vblocks rlineto stroke} 10 hblocks 10 div cvi] xrpt mark {0 10 moveto hblocks 0 rlineto stroke} 10 vblocks 10 div cvi] yrpt grestore} if grestore} def % Here are our rubbergrid controls... /lockrubbergrid false def % Don't unless really needed /fat5 true def % 3 pixels wide every fifth line? /fatter10 true def % 5 pixels wide every tenth line? /fatterborder true def % 5 pixel gray outline border? % rubbergrid utilities - drawing aides for the rubbergrid % line drawing stuff /line1 {.06 dup setlinewidth 5 mul /erase exch def} def /line2 {.12 dup setlinewidth 5 mul /erase exch def} def /line3 {.18 dup setlinewidth 5 mul /erase exch def} def % deferred font setting TEMPORARY - will be moved to gonzo /setfontssmaller { /yinc 1 def /pmrun 0 def /charstretch 0.033 def /spacestretch 0.05 def /ybot -9999 def /lastlinestretch lastlinestretch 0.1 mul def /font1 /Helvetica [0.7 0 0 0.8 0 0] gonzofont /font2 /Helvetica-Bold [0.7 0 0 0.8 0 0] gonzofont /font3 /Symbol [0.7 0 0 0.8 0 0] gonzofont /font4 /Helvetica [0.5 0 0 0.4 0 0] gonzofont /font5 /Helvetica-Bold [1.6 0 0 1 0 0] gonzofont } def % An improved graygrid routine that works BOTH at 300 and 600 DPI... /ggray {60 0 {sub abs 0.21 lt {1}{0} ifelse} setscreen gsave 0 60 0 {pop pop 1 add 1} setscreen grestore dup 25 eq {pop 0.8}{100 eq {0.72}{0.765} ifelse} ifelse setgray} def % ////////////////////////////////// % (4) Line drawing utilities % . . . . . . /mt {moveto} def /rm {rmoveto} def /rl {rlineto} def % these draw individual lines /x {rlineto currentpoint stroke moveto} def /r {0 x} def /r+ {dup x} def /r- {dup neg x} def /l {neg 0 x} def /l+ {neg dup neg x} def /l- {neg dup x} def /u {0 exch x} def /d {0 exch neg x} def % these create a path /pl {neg 0 rl} def /pl+ {neg dup neg rl} def /pl- {neg dup rl} def /pr { 0 rl} def /pr+ {dup rl} def /pr- {dup neg rl} def /pu {0 exch rl} def /pd {0 exch neg rl} def % these draw a line and "erase" across the background /ux {0 exch 2 copy gsave 1 setgray erase setlinewidth currentpoint .18 add moveto 0 setlinecap x grestore x } def /dx {neg 0 exch 2 copy gsave 1 setgray erase setlinewidth currentpoint .18 sub moveto 0 setlinecap x grestore x } def /rx {0 2 copy gsave 1 setgray erase setlinewidth currentpoint exch .18 add exch moveto 0 setlinecap x grestore x } def /lx {neg 0 2 copy gsave 1 setgray erase setlinewidth currentpoint exch .18 sub exch moveto 0 setlinecap x grestore x } def /dot { currentpoint newpath 0.150 0 360 arc fill } def /mdot { m dot} def % some small default circles /circ1 {gsave currentpoint newpath 0.20 0 360 arc whitefill line1 stroke grestore} def %for circle /circ2 {gsave currentpoint newpath 0.200 0 360 arc whitefill line2 stroke grestore} def %for complement /circ3 {gsave currentpoint newpath 0.8 0 360 arc line2 stroke grestore} def %for led /circ4 {gsave currentpoint newpath 0.33 0 360 arc whitefill line2 stroke grestore} def %for test point and switches % repeats [ proc distance trips] xrpt /xrpt{gsave aload pop /trips exch def /dist exch def /rproc exch def trips { gsave rproc grestore dist 0 translate } repeat grestore} def /yrpt{gsave aload pop /trips exch def /dist exch def /rproc exch def trips { gsave rproc grestore 0 dist translate } repeat grestore} def % some arrows . . . /uarrow {-.15 -.8 rlineto .3 0 rlineto closepath fill} def /darrow {gsave 180 rotate 0 0.8 rmoveto uarrow grestore} def /rarrow {gsave -90 rotate uarrow grestore} def /larrow { gsave 90 rotate uarrow grestore} def /whitefill { gsave 1 setgray fill grestore} def % ////////////////////////////////// % (5) electronics % . . . . . . % This section is being revised and improved % Opaque icons for use with the rubbergrid system. % This is older code that still needs rework. % In general, use -xpos- -ypos- iconname /electronics 200 dict def electronics begin /micro {font3 (m) show font1} def /ohms {font3 (W) show font1} def /tstpt {mt circ4 currentpoint 0.15 0 360 arc fill} def /xinv {0 1.25 rlineto 2.5 -1.25 rlineto -2.5 -1.25 rlineto closepath whitefill line2 stroke} def /rinverter{ mt gsave xinv grestore 2.7 0 rm circ2} def /linverter {mt gsave 180 rotate xinv grestore -2.7 0 rm circ2 } def /res {-0.8 0 rmoveto gsave 1.6 0 rlineto line1 1 setgray stroke grestore 0.10 0.3 rlineto 3 { .20 -.6 rlineto .20 .6 rlineto} repeat .20 -.6 rlineto 0.10 0.3 rlineto stroke} def /hresistor {mt res} def /vresistor { mt gsave 90 rotate res grestore} def /lpot { gsave translate gsave 0 -0.10 translate 0 0 vresistor grestore -.2 0 moveto rarrow grestore} def /cap {currentpoint 2 copy gsave 1 setgray 0 -.20 rlineto stroke grestore moveto -.6 0 rmoveto 1.2 0 rlineto stroke moveto 0 -1.2 rmoveto currentpoint newpath 1 55 125 arc stroke } def /vcap { mt cap } def /hcap { mt gsave 90 rotate cap grestore} def /uvcap { mt gsave 180 rotate cap grestore} def /schmitt {mt 0.3 0.3 rmoveto line1 -0.4 0 rlineto 0 -0.6 rlineto -.2 0 rlineto 0.4 0 rlineto 0 .6 rlineto stroke} def /dpdt {gsave translate 0 0 mt gsave newpath 0 0 mt 1 setgray 0.3 setlinewidth 0 2 rlineto 1.5 0 rlineto 0 -2 rlineto stroke grestore circ2 0 1 rm circ2 0 1 rm circ2 1.5 0 rm circ2 0 -1 rm circ2 0 -1 rm circ2 .2 setlinewidth 1 setlinecap -.35 .05 rm 1 u -.55 0 rm 1 d grestore} def /spdt { gsave translate 0 0 mt gsave newpath 0 0 mt 1 setgray 0.3 setlinewidth 0 2 rlineto 1.5 0 rlineto 0 -2 rlineto stroke grestore circ2 0 1 rm circ2 0 1 rm circ2 0.2 setlinewidth 1 setlinecap .45 0.05 mt 1 u grestore} def /diode{ currentpoint newpath moveto -.3 0 rmoveto gsave .7 -.4 rlineto 0 .8 rlineto closepath fill grestore -0.05 -.4 rmoveto 0 .8 rlineto 0.1 setlinewidth stroke } def /udiode { gsave moveto -90 rotate diode grestore } def /ddiode { gsave moveto 90 rotate diode grestore} def /led { mt currentpoint circ3 ddiode } def /negpulse { moveto -.35 .5 rmoveto .2 0 rlineto 0 -.5 rlineto 0.3 0 rlineto 0 .5 rlineto .2 0 rlineto stroke} def /pospulse { gsave 180 rotate negpulse grestore} def /5vdc {gsave 0 .8 rlineto currentpoint stroke .2 add 0.2 0 360 arc gsave 0.1 setlinewidth stroke grestore } def /xend { gsave -.1 0 rmoveto 0 .3 rlineto .2 0 rlineto 0 -.6 rlineto -.2 0 rlineto closepath gsave white fill grestore line1 stroke grestore} def /hxtal { mt gsave -.33 0 rmoveto 0.66 0 rlineto 0.3 setlinewidth 1 setgray stroke grestore gsave currentpoint exch -.35 add exch moveto xend 0.7 0 rmoveto xend grestore gsave 0 0.5 rmoveto 0 -1 rlineto 0.2 setlinewidth grayshade 1 ne {0.33}{0} ifelse setgray stroke grestore} def /sensor { gsave 2 copy vresistor .1 setlinewidth .5 sub newpath .6 0 -180 arcn 0 1.1 rlineto currentpoint stroke exch 0.6 add exch .6 180 0 arcn 0 -1.1 rlineto stroke grestore} def /ground { -.4 0 rmoveto 0.8 0 rlineto -.65 -0.2 rmoveto .5 0 rlineto -0.35 -0.2 rmoveto .2 0 rlineto stroke} def /uground {gsave 180 rotate ground grestore} def /lground {gsave -90 rotate ground grestore} def /rground {gsave 90 rotate ground grestore} def /dground {rground} def % old bug saved for old files /edgecon { gsave line2 mt 0 1.7 rm currentpoint newpath 0.3 180 0 arcn 1.7 d 0.6 l 1.7 u closepath gsave 1 setgray fill grestore stroke grestore} def /whitefill { gsave 1 setgray fill grestore} def /cell { gsave translate newpath 1 setgray 0 setlinecap 0 .3 mt 2 setlinewidth 0 -.6 rlineto stroke 0 setgray -.6 0.2 mt 0.3 setlinewidth 1.2 r stroke -1 -.3 mt line2 2 r grestore} def % //// DIPDRAW PROC ///// % dipdraw - draws a dip integrated circuit. (old code to be improved) % Enter with currentpoint set to pin 1 and scale % set so that 1.0 = distance between pins. Then % do a numpins-(name)-(hipins)-(lopins) dipdraw % Pin callouts preceeded by / will be complemented. % main dipdraw entry: /dipdraw { save /dipsnap exch def /hipins exch def /lopins exch def /chipname exch def /numpins exch def mark 0 0 0 0 0 0 0 0 0 0 0 0 % temp patch /howlong {numpins 2 div cvi 1 add} def /howhigh {4 numpins 36 ge {1 add} if} def /stub {howhigh 1.4 sub 2 div} def % internal service subs start here: /pinproc {numpins 2 div cvi{newpath 0 cpos 0.37 0 360 arc gsave 1 setgray fill grestore 0.067 setlinewidth stroke pin# 5 string cvs dup stringwidth pop 2 div neg cpos 0.2 sub moveto show 1 0 translate /pin# pin# dir add def} repeat } def /stretchprint { dup stringwidth pop 2 div neg exch length 1 sub stretch mul 2 div sub 0 moveto callout (/) anchorsearch true eq {currentpoint exch stretch add exch moveto pop dup /callout exch def stringwidth pop callout length 1 sub stretch mul add /barwide exch def 0.033 setlinewidth gsave currentpoint 0.55 add moveto barwide 0 rlineto stroke grestore} if stretch 0 callout ashow pop} def /pincallouts{0 vpos translate {workstring ( ) search true eq {/callout exch def pop /workstring exch def callout stretchprint 1 0 translate}{dup /callout exch def stretchprint exit } ifelse}loop} def % actual dipdraw process starts here: % ........ the outline: gsave 1 setlinecap 1 setlinejoin currentpoint translate newpath -.55 .45 0.15 0 360 arc fill newpath -1 howhigh 2 div 0.7 -90 90 arc 0 stub rlineto howlong 0 rlineto 0 howhigh neg rlineto howlong neg 0 rlineto closepath 0.36 setlinewidth stroke % ........ pin circles and numbers: /Helvetica-Bold findfont [0.4 0 0 0.55 0 0] makefont setfont gsave /pin# 1 def /dir 1 def /cpos 0 def pinproc grestore gsave /pin# numpins def /dir -1 def /cpos howhigh def pinproc grestore % pin callouts: /Helvetica findfont [0.35 0 0 0.6 0 0] makefont setfont /stretch 0.033 def gsave /workstring hipins def /vpos 0.6 def pincallouts grestore gsave /workstring lopins def /vpos howhigh 1.05 sub def pincallouts grestore % device number: /Helvetica-Bold findfont [1.4 0 0 1 0 0] makefont setfont /stretch 0.05 def gsave numpins 2 div 1 sub 2 div howhigh 2 div 0.33 sub translate chipname dup /callout exch def stretchprint grestore % end cleanup: grestore grestore cleartomark dipsnap restore} def % inductor stuff /lloop { .5 1 -.5 1 0 0 rcurveto} def /ltie {.2 -.30 .4 -.30 .6 0 rcurveto} def /lexit{.2 -.40 .4 0 .6 0 rcurveto .4 r } def /lentry {.4 r .2 0 .4 -.4 .6 0 rcurveto} def /hcoil { /numloops exch def lentry numloops 1 sub {lloop ltie} repeat lloop lexit} def /winding {gsave /numloops exch def translate 0 0 moveto 0 rotate numloops hcoil grestore} def /vwinding {gsave /numloops exch def translate 0 0 moveto 90 rotate numloops hcoil grestore} def /vrwinding {gsave /numloops exch def translate 90 rotate 1 -1 scale 0 0 moveto numloops hcoil grestore} def /phonejack {gsave translate 1 setlinecap 0 0 mt 0.15 u 3.85 r 0.3 d 3.85 l 3.95 0.15 mt 0.15 r 0.1 -0.15 rlineto -0.1 -0.15 rlineto 0.15 l 0.3 u 0.4 setlinewidth 2 setlinecap 0 0 mt 2 r 1 setlinecap 0 0.2 mt 2 r 0 -0.2 mt 2 r grestore } def /lilphonejack{ gsave translate 0.8 dup scale 0 0 phonejack grestore} def /varistor {gsave translate gsave -.5 0 mt 0.6 setlinewidth 1 setgray 1 r grestore line2 0.6 0.3 mt 1.2 l 0.6 -0.3 mt 1.2 l -0.45 -0.25 mt 0.3 0.50 rlineto 0.3 -0.50 rlineto 0.3 0.50 rlineto stroke grestore} def /piezo { gsave translate 0 0 mt gsave 5 dup scale circ1 grestore gsave 2.5 dup scale circ1 grestore grestore } def /pctab {gsave 1 setlinecap 1 setlinejoin line2 1 u 2 r 1 d 2 l grestore} def /npn {gsave newpath exch 0.2 sub exch translate -.1 0 1.2 0 360 arc gsave 1 setgray fill grestore line2 stroke -0.2 0 translate line3 -.3 -.7 moveto 1.4 u line1 -.3 0 mt 1.3 l -.2 .4 mt 0.6 0.4 rlineto 1.2 u newpath -.2 -0.4 mt 0.6 -0.4 rlineto 1.2 d newpath 0.4 -0.75 mt -.2 .3 rlineto -.2 -.3 rlineto closepath fill grestore} def /npnl {gsave translate -1 1 scale 0 0 npn grestore} def /pnp {gsave newpath exch 0.2 sub exch translate -.1 0 1.2 0 360 arc gsave 1 setgray fill grestore line2 stroke -0.2 0 translate line3 -.3 -.7 moveto 1.4 u line1 -.3 0 mt 1.3 l -.2 .4 mt 0.6 0.4 rlineto 1.2 u newpath -.2 -0.4 mt 0.6 -0.4 rlineto 1.2 d newpath -.2 .4 mt .3 .4 rlineto .1 -.3 rlineto closepath fill grestore} def /pnpl {gsave translate -1 1 scale 0 0 pnp grestore} def end % -- the electronics dictionary % ////////////////////////// % (6) arc justify - sets kerned circular text. % . . . . . % To use, -xpos -ypos- -radius- (message) karcjustify % A positive radius creates upward curving arcs. % A negative radius creates downward curving arcs. % Use -arckern- to stretch or compress global message. % Use -customkern- to adjust individual characters /arckern 1 def % global extra stretch + = stretch /customkern -1 def % custom extra squash - = squash /customkernchar (~) def % marker character to request custom kern /str (X) def /karcjustify {gsave /msg exch def /radius exch def translate msg stringwidth pop 0 msg {customkernchar 0 get eq {1 add} if} forall dup 0 gt {customkernchar stringwidth pop neg customkern add mul} if add msg length 1 sub arckern mul add 2 div dup 57.29578 mul radius div msg {str exch 0 exch put gsave rotate 0 radius moveto str dup dup dup customkernchar eq not {stringwidth pop 2 div 57.29578 mul radius div neg rotate show stringwidth pop}{customkern 2 div 57.29578 mul radius div neg rotate pop pop pop customkern} ifelse arckern add sub dup 57.29578 mul radius div grestore} forall pop pop grestore} def % //////////////// % (7) font eliminator % Font elimination completely eliminates the need for any strange % end user, editor, or typesetter run time fonts by substituting paths. % When *elimininatefonts* is called, all unbound *awidthshow* % commands will return font paths to host for recording and later % substitution. Level II only for capture. Two way comm essential. /eliminatefonts{ % shorter routine names used by font path procs... /mt {moveto} def /li {lineto} def % Note that lt and ln are spoken for! /ct {curveto} def /cp {closepath} def % optional time delay for host recording... /stall1 {50 {37 sin pop} repeat} def % optional stall % host reporting utility procs (currently 2 decimal place .XX accuracy) /prnum {index 100 mul round cvi 100 div ( ) cvs print ( ) print} def /prproc {0 index ( ) cvs print (\r) print flush stall1} def % this awidthshow diversion does all the actual work, returning all % widthshown font paths to the host for recording... /awidthshow {/str exch def /cys exch def /cxs exch def /sch exch def /sys exch def /sxs exch def str {currentpoint moveto (X) dup dup 4 -1 roll 0 exch put false charpath mark {/mt cvx 2 prnum 1 prnum prproc} {/li cvx 2 prnum 1 prnum prproc} {/ct cvx 6 prnum 5 prnum 4 prnum 3 prnum 2 prnum 1 prnum prproc} {/cp cvx dup prproc} pathforall ] cvx exec currentpoint fill moveto 0 get sch eq {currentpoint exch sxs add exch sys add moveto} if currentpoint exch cxs add exch cys add newpath moveto} forall } def} def % ////////////////////////////////// % (6) nuisance solvers % . . . . . . % nuisance - a dictionary of commonly used PostScript sequences % . . . . . . . . . . % nuisancedict is usually persistently downloaded as a subdictionary. % it is activated when needed by -- nuisance begin -- . 200 dict /nuisance exch def nuisance begin /acos {2 copy dup mul exch dup mul sub sqrt exch pop exch atan} def % arccosine use - xside hypotenuse acos - /asin {2 copy dup mul exch dup mul sub sqrt exch pop atan} def % arcsine use - yside hypotenuse asin - /backwards { 612 0 translate -1 1 scale} def % print backwards /bestgray {106 45 {dup mul exch dup mul add 1.0 exch sub} setscreen} def /black {0 setgray} def % draw in black /blackflash {0 0 moveto 1000 0 rlineto 0 1000 rlineto -1000 0 rlineto closepath fill showpage } def % black pre-page for highest print quality /boxdraw {bl bb bw bh brad roundbox blw setlinewidth stroke grestore } def % for old version compatibility % ///////////////////OLD ROUTINES NOT NOW IN USE///// % (2) boxdraw % . . . . . % This section is obsolete and will be phased out. use roundbox for % all new work % Draws various fancy boxes and sidebars, with or without % rounded corners and double hairlines /boxpath {/strt br bl add 2 div def /br {bl bw add} def % attempted repair /bc {bl bw 2 div add} def /bb {bt bh sub } def newpath strt bt moveto br bt br bb brad arcto br bb bl bb brad arcto bl bb bl bt brad arcto bl bt strt bt brad arcto closepath blw setlinewidth} def /br {bl bw add} def /bc {bl bw 2 div add} def /bb {bt bh sub} def %/boxdraw {boxpath stroke} def /boxfill {boxpath gsave fill grestore} def /hairdraw {gsave /hd exch def 0.5 setlinewidth bl bt hd sub moveto bw 0 rlineto 0 2.5 rmoveto bw neg 0 rlineto stroke} def /grabbox {/blw exch def /brad exch def /bh exch def /bt exch def /bw exch def /bl exch def} def /quickboxdraw {grabbox boxdraw} def /quickboxpath {grabbox boxpath} def /quickboxfill {grabbox boxfill} def % defaults /bl 200 def /bw 175 def /bt 500 def /bh 240 def /brad 7 def /blw 2 def /hd 25 def % use examples: boxdraw hd hairdraw -- draws the box and a title % boxpath -- generates only the path without stroking % gsave bl 10 add bb 15 add translate -- locks stuff % to inside of box; grestore exits % 200 175 500 240 7 2 quickboxdraw -- draws without % predefinition, but can't track inside height. /copies { /#copies exch def} def % as in -- 6 copies -- /feetfirst {180 rotate -612 -792 translate} def % eject print feet first /flushends {0 setlinecap} def % flush path ends /flushjoins {0 setlinejoin} def % flush path joins % GEniejul converts GEnie dates to Julian dates Enter with a six % digit integer; leave with date string on stack /GEniejul { ( ) cvs dup 2 2 getinterval cvi 1 sub [(January ) (February )(March )(April )(May )(June )(July )(August )(September ) (October )(November )(December )] exch get 1 index 4 2 getinterval (, ) mergestr mergestr exch 0 2 getinterval cvi dup 50 gt {1900} {2000}ifelse add ( )cvs mergestr} def % hrule does a fixed horizontal rule, given xstart ystart xend linewidth /hrule {gsave newpath setlinewidth 1 index 4 2 roll moveto lineto stroke grestore} def % vrule does a fixed vertical rule, given xstart ystart yend linewidth /vrule {gsave newpath setlinewidth 2 index 4 2 roll moveto exch lineto stroke grestore} def /inch {72 mul} def % inches /indiagray {135 35 {dup mul exch dup mul add 1.0 exch sub} setscreen} def /landscape {-90 rotate -792 0 translate} def % pick landscape printing /lightgray {0.99 setgray} def /listfonts {FontDirectory {pop == flush 200 {37 sin pop} repeat } forall} def % send installed font list to host /longjob {statusdict /waittimeout 180 put} def % lengthen job timeout /manual {statusdict /manualfeed true put} def % start manual feed % mergestr merges the two top stack strings into one top stack string /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def /negative {{1 sub abs} settransfer} def % negative printing /outline {false charpath} def % finds character outline path /pi 3.1415926 def % you wanted rhubarb instead? /pixel {72 mul 300 div} def % 300 dpi only /positive {{} settransfer} def % restore positive printing /printfonts {/Helvetica findfont [10 0 0 10 0 0] makefont setfont /xpos 150 def /ypos 600 def /yinc 12 def xpos 20 sub ypos 20 add moveto (CURRENTLY INSTALLED FONTS:) show FontDirectory {pop 100 string cvs xpos ypos moveto (/) show show /ypos ypos 12 sub def} forall showpage} def % on paper /putridgray {53 45 {dup mul exch dup mul add 1.0 exch sub} setscreen} def /random {rand 65536 div 32768 div mul cvi} def % as in -- 6 random -- /report {== flush 100 {37 sin pop} repeat } def % top of stack to host /reprogray {85 35 {dup mul exch dup mul add 1.0 exch sub} setscreen} def % Romnum routine converts any number from 0-99 into its equivalent Roman % numerals. Enter with stack integer. Leave with stack Roman string. /Romnum { dup 10 div cvi [() (x) (xx) (xxx) (xl) (l) (lx) (lxx) (lxxx) (xc)] exch get ( ) cvs exch 10 mod cvi [() (i)(ii)(iii) (iv)(v)(vi)(vii)(viii)(ix)] exch get mergestr} def /roundends {1 setlinecap} def % rounded path ends /roundjoins {1 setlinejoin} def % rounded path joins % This creates a rounded path from -radius- [x1 y1 x2 y2 ... xn yn] % roundpath. Does NOT round path ends. Use roundbox for boxes /roundpath {/rpdata exch def /rprad exch def rpdata length 1 sub cvi /rppoints exch def rpdata 0 get rpdata 1 get moveto 2 2 rppoints 2 sub {/rpvalue exch def 0 1 3 {rpdata exch rpvalue add get } for rprad arcto pop pop pop pop} for rpdata rppoints 1 sub get rpdata rppoints get lineto} def % roundbox draws a box path with rounded corners and locks you to the % lower lefthand box corner using this format ... % -xpos- -ypos- -xwidth- -yheight- -cornerrad- roundbox /roundbox {gsave /rad exch def /bt exch def /br exch def /bb exch def /bl exch def bl bb translate rad mark br 2 div 0 0 0 0 bt br bt br 0 br 2 div 0] roundpath /bc br bl sub 2 div def} def /snoop {1183615869 internaldict begin} def % activates superexec /stockends {2 setlinecap} def % default path ends /stockjoins {2 setlinejoin} def % default path joins /stall {{37 sin pop} repeat} def % delay as in -- 1500 stall -- % timing utilities. use stopwatchon and stopwatchoff for simple % one shot timing. For multiple time totals, use resettimer % starttimer stoptimer ... starttimer stoptimer reporttimer /stopwatchoff {stoptimer reporttimer} def % for single shots /stopwatchon {resettimer starttimer} def % for single shots /reporttimer {mytime 1000 div (\rElapsed time: ) print 20 string cvs print ( seconds.\r) print flush} def % to host /resettimer {/mytime 0 def} def % reset timer /starttimer {usertime /mytimenow exch def} def % add to time so far /stoptimer {usertime mytimenow sub /mytime exch mytime add def} def % for multiple timing intervals % stringdown, et al repeats a string of one or more characters to form % a fancy border. use -#repeats- -spacing- (char) stringdown, etc. /stringdown {/char exch def /vcharsp exch def {gsave char show currentpoint vcharsp sub moveto} repeat} def /stringleft {/char exch def /hcharsp exch def {gsave char show currentpoint exch hcharsp sub exch moveto} repeat} def /stringright {/char exch def /hcharsp exch def {gsave char show currentpoint exch hcharsp add exch moveto} repeat} def /stringup {/char exch def /vcharsp exch def {gsave char show currentpoint vcharsp add moveto} repeat} def % superstroke and superinsidestroke take a predefined path and a % top-of-stack array of [width1 gray1 width2 gray2 .... widthn grayn] % and do multiple strokes for wires, fancy borders, or braiding. % Note that the FIRST array value pair has to be the WIDEST, etc. % Use superstroke for wires; superinsidestroke for borders. /superstroke { save /sssnap exch def /sscmd exch def mark 0 2 sscmd length 2 div cvi 1 sub 2 mul {/aposn exch def gsave sscmd aposn get setlinewidth sscmd aposn 1 add get setgray stroke grestore} for cleartomark sssnap restore newpath} def /superinsidestroke {save clip /sssnap exch def /sscmd exch def mark 0 2 sscmd length 2 div cvi 1 sub 2 mul {/aposn exch def gsave sscmd aposn get 2 mul setlinewidth sscmd aposn 1 add get setgray stroke grestore} for cleartomark sssnap restore newpath} def /tan {dup sin exch cos dup 0 eq {pop 0.000001} if div} def % tangent /tray {statusdict /manualfeed false put} def % stop manual feed /white {1 setgray} def % print in white /width {stringwidth pop} def % finds x width of string end % the nuisance dictionary % ////////////////////////// % (9) switchable error trapper % . . . . . % Creates a printing error trapper that dumps the stack and prints what you % have accomplished so far. While EXTREMELY useful, this is definitely NOT % to be a replacement for true two-way comm. Adapted from EHANDLER.PS. % Use gutil begin printerror at the start of your file for time-of-error % printout and stack dump /printerror {/$brkpage 64 dict def $brkpage begin /prnt {dup type/stringtype ne{=string cvs}if dup length 6 mul /tx exch def/ty 10 def currentpoint/toy exch def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0 rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def /=={/cp 0 def typeprint nl}def /typeprint{dup type dup currentdict exch known {exec}{unknowntype}ifelse}readonly def /lmargin 72 def /rmargin 72 def /tprint {dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp exch def prnt}readonly def /cvsprint{=string cvs tprint( )tprint }readonly def/unknowntype{exch pop cvlit(??)tprint cvsprint}readonly def/integertype{cvsprint}readonly def/realtype{cvsprint}readonly def /booleantype{cvsprint}readonly def/operatortype{(//)tprint cvsprint} readonly def/marktype{pop(-mark- )tprint}readonly def/dicttype{pop (-dictionary- )tprint}readonly def/nulltype{pop(-null- )tprint}readonly def/filetype{pop(-filestream- )tprint}readonly def/savetype{pop (-savelevel- )tprint}readonly def/fonttype{pop(-fontid- )tprint}readonly def/nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def/stringtype {dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse }readonly def/arraytype{dup rcheck{dup xcheck{({)tprint{typeprint} forall(})tprint}{([)tprint{typeprint}forall(])tprint}ifelse}{pop (-array- )tprint}ifelse}readonly def/packedarraytype{dup rcheck{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint} forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse}readonly def /courier/Courier findfont 10 scalefont def/OLDhandleerror errordict /handleerror get def end errordict /handleerror {systemdict begin $error begin $brkpage begin newerror{/newerror false store $error /errorname get (ioerror) ne $error /command get (exec) ne or {vmstatus pop pop 0 ne{grestoreall}if initgraphics courier setfont lmargin 720 moveto (ERROR: )prnt errorname prnt nl(OFFENDING COMMAND: )prnt/command load prnt $error/ostack known {nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}repeat}if systemdict/showpage get exec /newerror true store/OLDhandleerror load end end end exec}{end end end} ifelse} {end end end}ifelse} dup 0 systemdict put dup 4 $brkpage put bind readonly put} def % ////////////////////////////////// end % the entire utility dictionary, except for gonzo justification %%%%%%%///////// % X E % Z % (11) Gonzo justification tools ... % ************************************************************************ % ************************************************************************ % GONZO 13 JUSTIFICATION POWER TOOL % ************************************************************************ % % SUMMARY: Exceptionally high quality, fully device independent, and ultra % fast (but non-WYSIWYG) Don Lancaster text justification routines. % % Includes auto drop caps, hanging punctuation, global kerning, % supertabs, callout modes, overstrikes, menu justify, scads more. % % Gonzo can also dump plain old ASCII text and can custom % emulate nearly anything. % % Gonzo is fully open, unlocked, documented, and reprogrammable. % % Reprinted from Don Lancaster's POSTSCRIPT BEGINNER STUFF. % % Copyright c 1991 by Don Lancaster. All rights fully reserved. % Free help line and additional info: (602) 428-4073. % % ************************************************************************ % Name of textfile: GONZO15A.PTL % Source: SYNERGETICS % Author: Don Lancaster % Desc: Superb quality text justification % Date: September 15, 1992 % Release: 15a (GEnie alpha "B" release) % Approx length: 46K % Status: Copyright 1990 by Don Lancaster and Synergetics. % 3860 West First Street, Thatcher, AZ. (602) 428-4073. % All commercial rights reserved. Personal use permitted % so long as this status message stays present and intact. % Gonzo POSTSCRIPT BEGINNER STUFF package $39.50 VISA/MC. % % Keywords: PostScript, gonzo, justification, compile, text % Approximate NTX run time: 2.50 seconds per 1000 chars (uncompiled) % 0.33 seconds per 1000 chars (compiled) % X E Activate XON/XOFF if necessary. % Z Values are shown for Apple Super Serial Card %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % WARNING: This is the GEnie "alpha" release. The compile, supertab, % and menu justify features are not yet all there. % % KEEP A WRITTEN USER LOG AND EXPECT PROBLEMS. % % Report problems, corrections, questions, etc, to PSRT. % % For further documentation, see PSRT #220 GONZO13A.TXT. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % GONZOJST.PTL is a series of utilities that allow ultra high quality % text justification from within a word processor or editor environment. % The routines are fast, fully programmable, use minimum length files, and % use little VM. They are purposely not WYSIWYG for maximum flexibility, % speed, and total device independence. Advanced features include auto drop % caps, hanging punctuation, individual kerning, lastline stretch, simple % textdumper, callout modes, macros, overstrike, and much more. The routines % be used WITHOUT control characters. They can emulate nearly anything. % An internal compiler is included for extremely fast rerun times. % Full use instructions appear in the companion file GONZO13A.TXT. % Also see the internal notes and comments below. % Status: Copyright 1990 by Don Lancaster and Synergetics. % 3860 West First Street, Thatcher, AZ. (602) 428-4073. % All commercial rights reserved. Personal use permitted % so long as this status message stays present and intact. % Gonzo POSTSCRIPT BEGINNER STUFF package $39.50 VISA/MC. % create a working dictionary that remains closed until needed ... 1000 dict /gonzo exch def gonzo begin % USER ALTERABLE COMMANDS - all must remain here as defaults % ======================= /altescapechar 124 def % alternate "escape" key for commands (|) /cstretch 0.2 def % minimum character kerning /colcheck { } def % link to page or column maker /dropcount 3 def % lines indented for drop cap /dropindent 40 def % width reserved for drop cap /escapechar 27 def % "escape" key for commands - can be printable /gonzocompile false def % compile to host or disk flag /gonzojust true def % allow gonzo commands? (false for text dumper) /hangflag true def % hang center, right, or fill punctuation? /hangfract 0.6 def % amount that hung punctuation hangs /hostcompdelay 80 def % optional compiling character report delay /justifylastline false def % fill justify last paragraph line? /justx (justL) def % running justification mode /kern 1 def % default individual kern amount /lastlinestretch 0.12 def % stretch on last line of fill just paragraph /oktoadvance true def % don't advance to next line if false /oktoprint true def % print suppression flag /overstrikechar (\320) def % overstrike character /overstrikeht 5.5 def % vertical shift of overstrike character /pm 10 def % normal paragraph indent /rslashchar 92 def % "reverse slash" key -alterable- /rslashok true def % allow reverse slash processing? /stringmode false def % string or currentfile source? /spacecharratio 6 def % fill justify ratio of space to char stretch /sstretch -0.3 def % minimum space kerning - may be negative /tabs [50 100 150 200] def % default tab list /txtwide 350 def % width of column /txtwideadj {} def % custom proc for keystoning, etc. /xpos 70 def % horizontal start of text /yinc 11 def % line spacing /ypara 0 def % additional v space at paragraph end /ypos 400 def % vertical start of text /ytop 720 def % default top reference for template /ybot -9999 def % default bottom reference for template % GONZOFONT BUILDER % ================= % gonzo fontnames MUST be of form /fontx, where x is any printable ASCII % character that has also been "qualified" to be a font in the command list. % A later gonzofont command rapidly sets the font and defines the space width. % gonzofont accepts either % /font1 /Helvetica 12 gonzofont -- or else -- % /font1 /Helvetica [wide climb slant high xshift yshift] gonzofont /gonzofont {dup type cvlit /arraytype eq {exch findfont exch makefont} {exch findfont exch scalefont} ifelse setfont mark /spacewidth ( ) stringwidth pop /cstretch cvx /add cvx /sstretch cvx /add cvx /def cvx currentfont dup backcdict exch (F?) dup 1 14 index (xxxxx) cvs 4 get put put /setfont cvx ] cvx def} def 50 dict /backcdict exch def % used "backwards" during compiling to get % fontname given the "made" font dictionary % USER FONTS - all should remain here as defaults ... % ========== /font0 /Helvetica-Bold [36 0 0 40 0 0] gonzofont % for drop caps /font1 /Helvetica 9 gonzofont % regular text /font2 /Helvetica-BoldOblique 9 gonzofont % reg italic /font3 /Helvetica-Bold 9 gonzofont % reg bold /font4 /Helvetica 8 gonzofont % reg all caps or #s /font5 /Helvetica-BoldOblique 8 gonzofont % italic all caps or #s /font6 /Helvetica-Bold 8 gonzofont % bold all caps or #s /font7 /Helvetica-Bold [6 0 0 6 0 -2] gonzofont % subscript /font8 /Helvetica-Bold [6 0 0 6 0 4] gonzofont % superscript /font9 /Helvetica-Bold [9 0 0 9 0 4] gonzofont % lowered bold title /font- /ZapfDingbats 9 gonzofont % Dingbats /font= /Symbol 9 gonzofont % Greek & Math /font: /Courier 9 gonzofont % Spare /font; /Courier 10 gonzofont % Spare /font+ /Courier 11 gonzofont % Spare font1 % set default % SYSTEM CONSTANTS - not normally altered % ================ /maxcharsbeforecr 6000 def % maximum number of characters before a cr /linestring1 maxcharsbeforecr string def % main for normal use /linestring2 maxcharsbeforecr string def % aux to allow headers /linestring linestring1 def % default /templatestartup {} def % default /maxprocsperline 200 def % maximum number of procs per print line /printlist maxprocsperline array def /dropflag false def % dropcap flag % /exitcheck {} def % default exit (overwritten by dump template) /firstchar 0 def % first character pointer /numspaces 0 def % initial number of spaces in line /pmrun 0 def % running paragraph margin /templatestartup {} def % link to template initializer % stack conventions during gonzojustify: all procs must restore % top stack value = next available position in linestring % next stack value = next available position in printlist % COMMAND LIST: % ============ % This command list determines the action of each [esc] selection. % First, create the list . . . /commands 256 array def 0 1 255 {commands exch {} put} for % You can have as many fonts as you like, trading off room for other % commands. Note that font1 is ASCII 49 and so on. % Here are the current font character definitions. . . commands (0) 0 get {font0} put commands (1) 0 get {font1} put commands (2) 0 get {font2} put commands (3) 0 get {font3} put commands (4) 0 get {font4} put commands (5) 0 get {font5} put commands (6) 0 get {font6} put commands (7) 0 get {font7} put commands (8) 0 get {font8} put commands (9) 0 get {font9} put commands (:) 0 get {font:} put commands (;) 0 get {font;} put commands (=) 0 get {font=} put commands (-) 0 get {font-} put commands (+) 0 get {font+} put % justification modes for command list commands (C) 0 get {justx 4 (C) 0 get put} put % center justify commands (F) 0 get {justx 4 (F) 0 get put} put % fill justify commands (L) 0 get {justx 4 (L) 0 get put} put % left justify commands (R) 0 get {justx 4 (R) 0 get put} put % right justify commands (P) 0 get {justx 4 (P) 0 get put} put % programmable just #1 commands (Q) 0 get {justx 4 (Q) 0 get put} put % programmable just #2 % macros for command list commands (a) 0 get {amacro} put commands (b) 0 get {bmacro} put commands (c) 0 get {cmacro} put commands (d) 0 get {dmacro} put commands (e) 0 get {emacro} put commands (f) 0 get {fmacro} put commands (U) 0 get {Umacro} put commands (V) 0 get {Vmacro} put commands (W) 0 get {Wmacro} put commands (X) 0 get {Xmacro} put commands (Y) 0 get {Ymacro} put commands (Z) 0 get {Zmacro} put % service routines for command list commands (h) 0 get {halflinefeedup} put % half linefeed up commands (i) 0 get {initialcap} put % initial dropcap commands (j) 0 get {kern+} put % positive kerning commands (k) 0 get {kern-} put % negative kerning commands (l) 0 get {linefeeddown} put % linefeed down commands (n) 0 get {nobreak} put % conditional ff commands (o) 0 get {overstrike} put % overstrike char commands (p) 0 get {/pmrun pm def} put % normal para indent commands (s) 0 get {/ypos -10000 def} put % showpage formfeed template link commands (t) 0 get {plainoldtab} put % simple tabbing commands (x) 0 get {exitproc} put % exit to PostScript commands (y) 0 get {fulllinefeedup} put % negative linefeed commands (z) 0 get {/pmrun 0 def} put % zero para indent % EXPANDED SERVICE ROUTINE DEFINITIONS % ==================================== /halflinefeedup {/ypos ypos yinc 2 div add def} def /fulllinefeedup {/ypos ypos yinc add def} def /linefeeddown {/ypos ypos yinc sub def} def /nobreak {ypos yinc 6 mul sub ybot lt {/ypos ybot def} if} def /initialcap {/ypos ypos yinc add ypara add def /pmrun 0 def /indentcount dropcount def /dropflag true def} def % a simple tab routine for lj only. Tabs relative to xpos /plainoldtab {tabs tabcount get dup /roomleft exch txtwide exch sub def mark exch xpos add ypos /moveto cvx] cvx printlist exch 3 index exch put exch 1 add exch tabcount tabs length 1 sub lt {/tabcount tabcount 1 add def} if } def /kern- {mark kern neg 0 /rmoveto cvx ] cvx printlist exch 3 index exch put /roomleft roomleft kern add def exch 1 add exch} bind def /kern+ {mark kern 0 /rmoveto cvx ] cvx printlist exch 3 index exch put /roomleft roomleft kern sub def exch 1 add exch} bind def /overstrike {printlist 2 index 1 sub get aload pop pop pop add 1 sub linestring exch 1 getinterval stringwidth pop dup overstrikechar stringwidth pop sub 2 div sub mark exch /gsave cvx exch /cfix cvx /add cvx /neg cvx overstrikeht /rmoveto cvx overstrikechar /rshowchars cvx /grestore cvx] cvx printlist exch 3 index exch put exch 1 add exch} def % stringmacro lets you do a series of gonzolink commands with a single % macro keystroke. For instance, /amacro {(z3c) stringmacro} def picks % a centered font3 with no paragraph for an embedded [esc]-a. /stringmacro { {commands exch get exec} forall} def % This lets you use [esc]-g instead of startgonzo (\033g) cvn {startgonzo} def (|g) cvn {startgonzo} def % CHARACTER COMMAND ARRAY (fake CASE) % ======================= % create an executable array based on character to decide who does what /chararray 256 array def % decides action of each key 0 1 255 { /posn exch def chararray posn [posn /chartolinestring cvx ] cvx put} for % default 1:1 mapping chararray dup 0 {} put dup 10 {newlineproc} put % lf newline dup 13 {newlineproc.wcrlf} put % cr as newline dup 32 {spaceproc} put % spaceproc dup escapechar {gonzojust {escproc}{exitcheck} ifelse} put % escape key dup altescapechar {gonzojust {escproc}{exitcheck} ifelse} put % altesc key dup rslashchar {rslashok {rslashproc} {rslashchar chartolinestring} ifelse} put % rslash key - can alter pop %%%%% CR-LF ATTEMPTED PATCH %%%%% % This ignores a cr if the next character is a linefeed /newlineproc.wcrlf{ stringmode {getstringchar}{currentfile read} ifelse % read next w end check { % true-false on valid read dup 10 eq {pop newlineproc } % if cr-lf {/crlfhold exch store newlineproc chararray crlfhold get exec } % if not ifelse } % if a character followed cr {newlineproc exit} ifelse % if cr was the last character } def %%%%%%%%%%%%%% % Charproc simply piles up characters into linestring. % Other commands decide how these characters are to be used. /chartolinestring {linestring exch 2 index exch put 1 add } bind def % exitproc responds to [esc]-x and gets you out of gonzo after printing. /exitproc {exit} def % rslashproc takes care of the reverse slashes which are not active when % not reading strings. Modified to reject cr-lf pairs % create an action array /slashlist 256 array def 0 1 255 {slashlist exch {} put} for slashlist dup 48 {0 octalnum} put % process as octal number dup 49 {1 octalnum} put dup 50 {2 octalnum} put dup 51 {3 octalnum} put dup 40 {40 chartolinestring} put % left paren dup 41 {41 chartolinestring} put % right paren dup 92 {92 chartolinestring} put % reverse slash dup 114 {chararray 13 get exec} put % carriage return dup 108 {chararray 10 get exec} put % linefeed dup 116 {slashtab} put % tab someday dup 98 {slashbs} put % backspace someday dup 102 {slashformfeed} put % formfeed someday pop /slashtab {nogot} def /slashbs {nogot} def /slashformfeed {nogot} def /nogot {reverse_slash _feature_not_yet_defined} def /rslashproc { % modified to reject cr-lf pairs stringmode {getstringchar}{currentfile read} ifelse {dup 13 eq { pop stringmode {getstringchar}{currentfile read} ifelse % char after cr {dup 10 ne { chararray exch get exec}{pop} ifelse } {pop exit} ifelse % if out of chars } % if cr {slashlist exch get exec} % if not cr ifelse } {exit} ifelse } % if no more chars bind def % octalnum handles all reverse slashes followed by three octal nuambers. /octalproc { stringmode {getstringchar}{currentfile read} ifelse { 48 sub dup dup 0 lt exch 7 gt or {pop 0} if} {exit} ifelse} def /octalnum {8 mul octalproc add 8 mul octalproc add chararray exch get exec} bind def % TXTWIDE FITTING SERVICE UTILITIES % ================================= % longstringadj currently lets an all print string longer than % txtwide invade the margin, rather than forcing a break or error /longstringadj {dup txtwide ge {pop txtwide 10 div} if} bind def % doeswordfit attempts to add the length of the current trial word to % the present line. It returns a positive value if room remains and % a negative one if not. /doeswordfit {linestring wordstart dup 3 index exch sub getinterval dup dup length 0 gt {stringwidth pop exch length cstretch mul add /wordroom exch def} {pop pop /wordroom 0 def} ifelse roomleft wordroom longstringadj sub dup 0 gt} bind def % tryspacefit attempts to add a space to the end of the existing word. % if it fits, word is accepted. If not, line ends. /tryspacefit {roomleft spacewidth sub dup 0 ge {/roomleft exch def dup 1 add dup /oktohere exch def /wordstart exch def 1 add /numspaces numspaces 1 add def} {pop /wordroom 0 def /oktohere oktohere 1 add def substart dup oktohere sub neg wordtoplist exch /plistlength exch def 0 exch endtheline /wordstart oktohere def startnextline} ifelse } bind def % wordtoplist adds word to printlist if positive length. Start out with % -plistpoint- -charpoint- -startchar- -length- on stack. End with % new word grouip in print array and -newplist- -charpoint-. /wordtoplist {dup 0 gt {mark 3 1 roll dup numchars add /numchars exch def currentfont /showchars cvx ] cvx printlist exch 3 index exch put exch 1 add exch } {pop pop} ifelse } bind def % *** ESCPROC *** % On an escape (or substitute escape) command character ... % yes ------ previous word fit? -------- no % word to printlist closeline % do escape command word to next line always % word to new printlist % do escape command /escproc { doeswordfit {/roomleft exch def dup dup /oktohere exch def /wordstart exch def substart dup oktohere sub neg wordtoplist} {pop substart dup oktohere sub neg wordtoplist exch /plistlength exch def 0 exch endtheline startnextline dup dup /oktohere exch def /wordstart exch def substart dup oktohere sub neg wordtoplist /firstchar -1 def } ifelse /substart oktohere def commands stringmode {getstringchar}{currentfile read} ifelse {get exec}{exit} ifelse } bind def % *** NEWLINEPROC *** % On as carriage return or newline character ... % yes ------ previous word fit? -------- no % update word closeline % closeline word to next line always % closeline /newlineproc {doeswordfit {/roomleft exch def dup dup /oktohere exch def /wordstart exch def substart dup oktohere sub neg wordtoplist /lastparline true def exch /plistlength exch def 0 exch endtheline /wordroom 0 def /firstparline true def startnextline} % word did fit on line {pop substart dup oktohere sub neg wordtoplist exch /plistlength exch def 0 exch endtheline startnextline dup dup /oktohere exch def /wordstart exch def substart dup oktohere sub neg wordtoplist /lastparline true def exch /plistlength exch def 0 exch endtheline /firstparline true def /wordroom 0 def startnextline % word did not fit on line } ifelse pop 0 /substart 0 def /wordstart 0 def /oktohere 0 def /firstchar -1 def} bind def % *** SPACE PROC *** % Leading spaces are ignored in an ongoing paragraph with the firstchar test. % For speed, "words" may include internal spaces if there is enough room. % % yes ------ previous word fit? -------- no % update word closeline % yes --- word+space fit? -- no word to next line always % update word closeline yes -- word+space fit? --- no % update word closeline /spaceproc { dup firstchar ne {linestring 1 index 32 put doeswordfit {/roomleft exch def dup 1 sub /oktohere exch def tryspacefit} {pop substart dup oktohere sub neg wordtoplist exch /plistlength exch def 0 exch endtheline startnextline tryspacefit} ifelse} if} bind def % *** SWALLOW AND HANG *** % swallowandhang is a dual purpose proc that swallows any trailing spaces % and optionally hangs punctuation for center, right, and fill justification. % The swallowlist decides which characters get acted on for hanging. % The "1" before the hung character lets you individually customize overhang. % hangfract lets you adjust the overhang of all characters together. /swallowlist 256 array def 0 1 255 {swallowlist exch {exit} put} for swallowlist dup ( ) 0 get {swallow} put dup (-) 0 get {1 (-) hangpunct} put dup (.) 0 get {1 (.) hangpunct} put dup (,) 0 get {1 (,) hangpunct} put dup (;) 0 get {1 (;) hangpunct} put dup (:) 0 get {1 (:) hangpunct} put dup (") 0 get {1 (") hangpunct} put dup (') 0 get {1 (') hangpunct} put dup (}) 0 get {1 (}) hangpunct} put dup 41 {1 (\051) hangpunct} put % closing parenthesis dup 177 {1 (\261) hangpunct} put % em dash dup 208 {1 (\320) hangpunct} put % en dash dup 186 {1 (\272) hangpunct} put % closing double quote pop % hangpunct shortens roomleft if hanging is wanted. /hangpunct { hangflag { stringwidth pop mul hangfract mul roomleft exch add /roomleft exch def} {pop pop} ifelse exit } bind def % swallow removes one leading space /swallow {/lopspaces lopspaces 1 add def} bind def % swallowandhang first tests for a normal showchars ending. It then runs % sandh to do the actual swallowing or punctuation hanging. /swallowandhang { printlist plistlength 1 sub get dup dup length 4 eq {3 get cvlit /showchars eq {sandh}{pop pop} ifelse} {pop pop} ifelse } bind def % sandh grabs the last string of characters and works backwards through % them, providing a count of total trailing spaces, and hanging selected % punctuation. The roomleft is then adjusted accordingly. /sandh {/lopspaces 0 def dup 0 get exch 1 get linestring 3 1 roll getinterval /laststring exch def laststring length 1 sub -1 0 {laststring exch get swallowlist exch get exec} for /roomleft lopspaces spacewidth mul roomleft add def /numchars numchars lopspaces sub def /numspaces numspaces lopspaces sub def} bind def % *** LINE CONTROLS ****** % startnextline resets pointers, handles indents, sets up first move. /startnextline { oktoadvance {/ypos ypos yinc lastparline {ypara add} if sub def } if % move to next line colcheck % link to page template /lastparline false def % can't be the last line /substart wordstart def % point to start of current word /numspaces 0 def % character+space line count /numchars 0 def % space line count /tabcount 0 def % tab count 0 firstparline {pmrun add /firstparline false def} if % pm indent? dropflag {dropcount 0 ge {dropindent add /dropcount dropcount 1 sub def dropcount 0 eq {/dropflag false def} if} if} if % indent dropcap? dup wordroom add neg txtwide add txtwideadj /roomleft exch def printlist 0 [ 3 index /xymove cvx ] cvx put pop exch pop 1 exch dup /firstchar exch def} bind def % endtheline executes a justify proc to set xfix, yfix, cfix and sfix % and then conditionally prints the printlist ... /endtheline { justx cvx exec oktoprint {printline} if} bind def % *** JUSTIFY PROCS ******** % The justify procs take the character count, the space count, and roomleft % and convert these into xfix and yfix entire line offsets and % cfix and sfix character and space kerning. /justC {swallowandhang /sfix sstretch def /cfix cstretch def /xfix roomleft 2 div def /yfix 0 def} bind def /justF {lastparline {justifylastline {reallyjustF} {justL adjustlastline} ifelse }{reallyjustF} ifelse} bind def /justL {/sfix sstretch def /cfix cstretch def /xfix 0 def /yfix 0 def} bind def /justR {swallowandhang /sfix sstretch def /cfix cstretch def /xfix roomleft def /yfix 0 def} bind def /reallyjustF {swallowandhang roomleft numchars 1 sub numspaces spacecharratio mul add dup 0 eq {pop 0.001} if div dup cstretch add /cfix exch def spacecharratio mul sstretch add /sfix exch def /xfix 0 def /yfix 0 def} bind def % unconditional justF % optional additional final line stretch is used only if it uses up less % than 80 percent of the remaining room. Otherwise might look cramped /adjustlastline { numchars 1 sub numspaces spacecharratio mul add lastlinestretch mul roomleft 0.8 mul lt {/cfix cfix lastlinestretch add def /sfix sfix lastlinestretch spacecharratio mul add def} if} def % *** PRINT MODULE ******** % printline accepts a series of procs from the printlist and executes them % It expects a printlist of form [{proc1}{proc2}{proc3}...{procn] and % these variables predefined ... % plistlength % length of printlist % sfix % total space kerning for line % cfix % total character kerning for line % xfix % total x-shift for line (for centering, rj, etc.) % yfix % total y-shift for line (normally zero) % indent % first line or drop cap indent /sfix 0 def /cfix 0 def /xfix 0 def /yfix 0 def % defaults /printline {gsave 0 1 plistlength 1 sub {printlist exch get exec} for grestore} bind def % some often-used print-time macros . . . % -stringstart- -stringlength- -madefontdict- showchars --> images string at % the currentpoint. /showchars { setfont linestring 3 1 roll getinterval sfix 0 32 cfix 0 6 -1 roll awidthshow1} bind def /rshowchars {show1} def % overstrike to compile link % -indent- xymove ---> does absolute move to xpos + indent, ypos /xymove {xpos add xfix add ypos yfix add moveto} bind def % these two links have to stay unbound for Distillery or self-compiling /show1 {show} def /awidthshow1 {awidthshow} def % %%% MAIN GONZO JUSTIFY ROUTINE %%% % startgonzo reads the currentfile, either piling up printable characters % into linestring, or acting out escape or space commands. % and here's gonzo ... /initgonzostuff { /wordroom 0 def /firstparline true def /lastparline false def /wordstart 0 def /substart 0 def /roomleft txtwide def /oksofar 0 def /numchars 0 def /lopcount 0 def /firstchar -1 def /tabcount 0 def /gotcr false def } bind def /startgonzo {initgonzostuff 0 0 printlist 2 index [0 /xymove cvx] cvx put exch 1 add exch {currentfile read {chararray exch get exec}{exit} ifelse} loop pop pop % remove pointers from stack } bind def % stringgonzo is similar to startgonzo, except that it accepts an % input string instead of the currentfile. This is handy for deferred % or predefined uses. stringgonzo is significantly (25%) slower than % startgonzo. An extra carriage return is always added to the string end. % to make sure the last line prints. % Current bugs: can't embed printable \ with \\ or \134 and an extra % carriage return or double space MUST follow stringgonzo to stay error free. /stringgonzo {initgonzostuff dup length 1 add dup /gslen exch def string dup /gonzostring exch def exch 0 exch putinterval gonzostring gslen 1 sub 13 put /gsptr 0 def /stringmode true def 0 0 printlist 2 index [0 /xymove cvx] cvx put exch 1 add exch {getstringchar {chararray exch get exec}{exit} ifelse} loop pop pop /stringmode false def } bind def /getstringchar {gsptr gslen ge{ false } {gonzostring gsptr get true} ifelse /gsptr gsptr 1 add def} bind def % CALLOUT JUSTIFY MODES % cl accepts an input of form xpos ypos (message) cl and shows it % at xpos left and within xpos + textwide right. /cl {save /snapcl exch def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo snapcl restore} def % cf accepts an input of form xpos ypos (message) cf and shows it % flush left at xpos and flush right at xpos + textwide. /cf {save /snapcf exch def /linestring linestring2 def /justx (justF) def 3 1 roll /ypos exch def /xpos exch def stringgonzo snapcf restore} def % cc accepts an input of form xpos ypos (message) cc and centers it % on xpos. txtwide IS IGNORED, AND ANY WIDTH WILL GET CENTERED. /cc {save /snapcc exch def /linestring linestring2 def /txtwide 5000 def /justx (justC) def /pmrun 0 def 3 1 roll /ypos exch def 2500 sub /xpos exch def stringgonzo snapcc restore} def % cr accepts an input of form xpos ypos (message) cr and sets it % flush right against xpos. txtwide IS IGNORED, AND ANY WIDTH % WILL SET FLUSH RIGHT. /cr {save /snapcm exch def /linestring linestring2 def /txtwide 5000 def /justx (justR) def /pmrun 0 def 3 1 roll /ypos exch def 5000 sub /xpos exch def stringgonzo snapcm restore} def % COMPILING ROUTINES % Compiling can be done either to the host (using a two way comm % channel or to hard disk. The compiled files are Adobe Distillery % compatible but slightly shorter and faster. They can be further % sped up and shortened with an add-on utility. % To compile, issue a compiletohost or a compiletodisk after beginning % gonzo. /compiletohost {/hostcompflag true def sendcompileheader} def /compiletohost {/diskcompflag true def sendcompileheader} def /send { dup hostcompflag { print flush hostcompdelay {37 sin pop} repeat}{pop} ifelse dup diskcompflag { writehere }{pop} ifelse pop } def % TEMPLATE LOADER % starttemplate opens a template whose name is on the top of the stack and % executes an internally defined template command templatestartup /starttemplate {begin templatestartup} def %%%%%%%%% % SIMPLE TEXT DUMPER % This default text dumper template is useful for "just dump the text" % applications. The | and \ characters are handled as ordinary text in % this example. The only gonzo commands used are for the carriage return % and the linefeed. A "double escape" | | exits you. % This template is also useful to list your gonzo programs while PRINTING % (rather than executing) all internal gonzo commands. (!!!) % Note that any template MUST have an internal proc named templatestartup % and that your template MUST NOT call gonzofont before run time. 300 dict /dumpasciitext exch def dumpasciitext begin /templatefonts{ /font1 /Helvetica 8 gonzofont % regular text (defer till run time) /font2 /Helvetica-Bold 7 gonzofont % header font (defer till run time) } def /txtwide 230 def % width of column /pm 0 def % no paragraph indents /lmpos 60 def % horizontal left margin /yinc 9.5 def % vertical line spacing /ytop 720 def % top column reference /ybot 50 def % bottom column reference /pagenum 1 def % initial pagenumber /numcolumns 2 def % number of columns /colspace 260 def % spacing between columns % colcheck does all the work in a pagemaker. It is automatically called % at the start of each new printable line. It can make room for figures, etc. /colcheck {ypos ybot lt {column# numcolumns ge {showpage /ypos ytop def /xpos lmpos def /column# 1 def header footer}{/ypos ytop def /xpos xpos colspace add def /column# column# 1 add def} ifelse} if} def % This particular header puts the pagenumber into a message string and % shows it at the right margin of the rightmost column. You can do % left-right and otherwise get as fancy as you care to here ... /header {gsave spacewidth font2 rpagenum (xxxxxx) cvs dup length 5 add string dup 0 (page ) putinterval dup 5 3 index putinterval exch pop lmpos numcolumns 1 sub colspace mul add txtwide add exch ytop yinc 2.5 mul add exch cr grestore /rpagenum rpagenum 1 add def /spacewidth exch def } def /footer {} def % none today /templatestartup { templatefonts font1 /column# 1 def /xpos lmpos def /ypos ytop def/gonzojust false def /rslashok false def /rpagenum pagenum def header footer} def % exitcheck lets you decide how to exit your ASCII text dumper, and can get % VERY sticky. This example uses a double | | as a "double escape". This % trick lets you use this template to print a gonzo LISTING that has all % of the gonzo commands in it (!), but acts improperly on none of them. /asciiexitchar (|) def % exit character reserved if preceeded by altescchar /exitcheck {currentfile read {dup asciiexitchar 0 get eq {pop exitproc} {/chold1 exch def altescapechar chartolinestring chold1 chartolinestring} ifelse}{exitproc} ifelse} def end % dumpasciitext template % Here is a PostScript "textonly" convenience operator that speeds up % text dumping... /textonly {dumpasciitext starttemplate startgonzo} def %%%%%%%%% % SIMPLE PAGE MAKING TEMPLATE % This default gonzo page making template is a useful starting point for % creating your own custom templates. It handles multiple columns and % left-right page numabered headers. All gonzo commands are supported. % Note that there is NO difference between a pagemaker and an emulator. % Everything is programmable, so just rearrange things to suit yourself. % Full document control (for figures etc) is done by extending colcheck. % Note that any template MUST have an internal proc named templatestartup % and that your template MUST NOT call gonzofont before run time. 300 dict /simplepages exch def simplepages begin /templatefonts { % Remember: all fonts MUST defer till run time! /font0 /Times-Bold [54 0 0 54.2 0 -32] gonzofont % drop cap /font1 /Times-Roman 9.75 gonzofont % main text /font2 /Times-Italic 9.75 gonzofont % main italic /font3 /Times-Bold 9.75 gonzofont % main bold /font4 /Times-Roman 9 gonzofont % capnum text /font5 /Times-Italic 9 gonzofont % capnum italic /font6 /Times-Bold 9 gonzofont % capnum bold /font7 /Times-Bold [9.75 0 0 9.5 0 -6] gonzofont % lowered subheader /font= /Symbol 9.75 gonzofont % its greek to me /font- /ZapfDingbats [9 0 0 9 0 4] gonzofont % dingbats } def % values used by gonzo justify ... /colspace 175 def % spacing between columns /cstretch 0.2 def % minimum character kerning /dropcount 4 def % number of lines drop cap drops /lastlinestretch 0.06 def % open last paragraph line slightly /pm 10 def % use paragraph indents /sstretch -0.3 def % minimum space kerning /txtwide 155 def % width of column /ybot 50 def % bottom column reference /yinc 10.5 def % vertical line spacing /ytop 715 def % BASE of top column reference /yinc 10.5 def % vertical line spacing % additional values used by this template /firstpagespecial false def % special treatment for first page? /lmpos 60 def % horizontal left margin /numcolumns 3 def % number of columns /oddpageright true def % are odd numbered pages on the right? /rightpage false def % start with righthand page? /pagenum 1 def % running pagenumber % These macros handle an initial drop cap and low center subheads ... /amacro {(zy0) stringmacro /ypos ypos ypara add def} def % start drop cap /bmacro {(iFy1) stringmacro /ypos ypos ypara add def} def % finish drop cap /cmacro {staytint1 (znyC7) stringmacro /ypos ypos ypara 2 mul add def} def % centered title /dmacro {tintoff(pF1) stringmacro /ypos ypos ypara 2 mul add def} def % normal text after centered title % colcheck does all the work in a pagemaker. It is automatically called % at the start of each new printable line. It can make room for figures, etc. /colcheck {ypos ybot lt {column# numcolumns ge {showpage /ypos ytop def /xpos lmpos def /column# 1 def header footer}{/ypos ytop def /xpos xpos colspace add def /column# column# 1 add def} ifelse} if} def % This particular header picks different formats for left and right pages /header {pagenum cvi 2 mod 0 eq rightpage {not} if {leftheader} {rightheader} ifelse /pagenum pagenum 1 add def} def /headerstripe {gsave xpos ytop 19 add moveto colspace numcolumns 1 sub mul txtwide add 0 rlineto 0.5 setlinewidth stroke} def /leftheader {gsave spacewidth font2 pagenum (xxxxxx) cvs dup length 5 add string dup 0 (page ) putinterval dup 5 3 index putinterval exch pop lmpos exch ytop yinc 2.5 mul add exch cl grestore headerstripe /spacewidth exch def} def /rightheader {gsave spacewidth font2 pagenum (xxxxxx) cvs dup length 5 add string dup 0 (page ) putinterval dup 5 3 index putinterval exch pop lmpos numcolumns 1 sub colspace mul add txtwide add exch ytop 25 add exch cr grestore headerstripe /spacewidth exch def} def /firstpageheader {} def % nothing special today /footer {gsave xpos ybot 6 sub moveto colspace numcolumns 1 sub mul txtwide add 0 rlineto 1.5 setlinewidth stroke} def /templatestartup { templatefonts font1 /column# 1 def /xpos lmpos def /ypos ytop def /gonzojust true def /rslashok true def header footer} def end % simplepages template %%%%%%%%%%%%%%%% end % entire gonzo dictionary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % END OF GURU'S GONZO JUSTIFY UTILITIES AND TEMPLATES % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% statusdict begin statusdict /setduplexmode known {true setduplexmode} if end systemdict /setstrokeadjust known {true setstrokeadjust} if /mastergray {0.96} def % sets overall light grade shade %%%%%%%%%%%%%%%%% % Here's some needed routines not yet in GUTILITY.PTL or GONZO13A.PTL %............... % roundbox draws a box path with rounded corners and locks you to the % lower lefthand box corner using this format ... % -xpos- -ypos- -yheight- -cornerrad- roundbox /roundbox {gsave /rad exch def /bt exch def /br exch def /bb exch def /bl exch def bl bb translate rad mark br 2 div 0 0 0 0 bt br bt br 0 br 2 div 0] roundpath} def % vrule gives a fixed vertical rule, inputting xpos ystart yend linewidth /vrule {gsave newpath setlinewidth 2 index 4 2 roll moveto exch lineto 0 setgray stroke grestore} def % hrule gives a fixed horizontal rule, inputting ypos xstart xend linewidth /hrule {gsave newpath setlinewidth 1 index 4 2 roll moveto lineto 0 setgray stroke grestore} def % mergestr is a tool useful for page numbers; evenutally it will go % into the nuisance dictionary /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def % this is a repeat of the GONZO13B callout width proc ... gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end gonzo begin % This is the core keystone code routine. It works by taking an average % of the first two and last two string lengths to determine the keystone % slope, increment, and starting width. It then checks the length of % each line and extends the starting width as needed so everything fits. /keyproc {/kadj exch def /msg exch def /yy1 exch def /xx1 exch def mark {msg (\n) search {exch pop exch /msg exch def dup length 0 le {pop} if}{dup length 0 le {pop} if exit} ifelse} loop ] /karray exch def 0 0 karray 0 get cw 0 0 karray 1 get cw add 2 div dup 0 0 karray dup length 1 sub get cw 0 0 karray dup length 2 sub get cw add 2 div sub neg karray length 1 sub div dup /kinc exch def 2 div sub /kstart exch def /txtwide 10000 def 0 0 1 karray length 1 sub {/kpn exch def 0 0 karray kpn get cw kstart kinc kpn mul add sub 2 copy lt {exch} if pop} for kstart add 1.01 mul dup /kstart exch def /txtwide exch def /justifylastline true def 0 1 karray length 1 sub { /posn exch def yy1 xx1 kstart kadj exch posn karray exch get cf /txtwide txtwide kinc add def /xx1 xx1 kinc kadj def /yy1 yy1 yinc sub def} for} def % these are the three keystone routines. Use xpos ypos true (msg strings) % cck, etc. true for keystone; false for ordinary justify. /cck {save /keysnap exch def exch {{2 div sub} keyproc} {cc} ifelse keysnap restore} def % callout centered keystone /clk {save /keysnap exch def exch {{pop} keyproc} {cl} ifelse keysnap restore} def % callout left keystone /crk {save /keysnap exch def exch {{sub} keyproc} {cr} ifelse keysnap restore} def % callout right keystone end % close gonzo dictionary %%%%%% doembeddedproc executes |/name installdoembeddedproc links it /doembeddedproc {mark 50 {stringmode {getstringchar}{currentfile read} ifelse not {exit} if dup dup dup 32 eq exch 13 eq or exch 10 eq or {pop exit} if} repeat counttomark dup string /pstr1 exch def 1 sub -1 0 {pstr1 3 1 roll exch put} for pstr1 exch pop cvx exec} def /installdoembeddedproc {gonzo begin commands (/) 0 get {doembeddedproc} put end} def installdoembeddedproc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% your gonzo code goes here. The usual way of starting it is with %% gonzo begin %% ps.util.1 begin %% printerror %% nuisance begin %% Additional use details appear in the POSTSCRIPT BEGINNER STUFF %% package from SYNERGETICS. %%%%%%%%%%%%%%%%%% COLORIZER MOD %%%%%%%%%%%%% %%%%%%%%%%%%%%%% % COLORIZING BLACK AND WHITE POSTSCRIPT MODULE % ===================================== /tintmat [ {dup 0.11 ge {0.11 sub 0.89 div dup 1 setrgbcolor} % 0 blue {0.11 div 0 exch 0 exch setrgbcolor} ifelse} {dup 0.3 ge {0.3 sub 0.7 div 1 exch dup setrgbcolor} % 1 red {0.3 div 0 0 setrgbcolor} ifelse} {dup 0.59 ge {0.59 sub 0.41 div dup 1 exch setrgbcolor} % 2 green {0.59 div 0 exch 0 setrgbcolor} ifelse} {dup 0.7 ge {0.7 sub 0.3 div 1 1 setrgbcolor} % 3 turquoise {0.7 div 0 exch dup setrgbcolor} ifelse} {dup 0.41 ge {0.41 sub 0.59 div 1 exch 1 setrgbcolor} % 4 magenta {0.41 div dup 0 exch setrgbcolor} ifelse} {dup 0.89 ge {0.89 sub 0.11 div 1 exch 1 exch setrgbcolor} % 5 yellow {0.89 div dup 0 setrgbcolor} ifelse} {dup 0.842 ge {dup .7 mul .59 sub .11 div 1 exch setrgbcolor} % 6 lime {0.89 div dup 1.1233 div exch 1.1233 mul 0 setrgbcolor} ifelse} {dup 0.731 ge {1 exch dup .41 mul .30 sub .11 div setrgbcolor} % 7 beige {0.856 div dup 1.155 mul exch 1.55 div 0 setrgbcolor} ifelse} ] def /tint 7 def /setgray {tintmat tint get cvx exec} bind def %%%%%%%%%%%%%%% %%%%%%%%%%%%%% COMPACT VERSION OF COLORIZER II %%%%%%%%%%%%%%%%%%%%%% /settint {dup /currenttint exch store 5.999 mul dup floor cvi /&cbar exch store dup floor sub /&cwt exch store [ {/setgray [ /dup cvx 0.3 &cwt 0.59 mul add /ge cvx [1 /exch cvx &cwt 0.59 mul 0.30 add /sub cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx ] cvx [ &cwt 0.59 mul 0.3 add /div cvx /dup cvx &cwt /mul cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub 0.3 mul add /ge cvx [1 &cwt sub 0.3 mul 0.59 add /sub cvx &cwt 0.3 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx /exch cvx 1 /exch cvx] cvx [1 &cwt sub 0.3 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 &cwt 0.11 mul add /ge cvx [&cwt 0.11 mul 0.59 add /sub cvx 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx 1 /exch cvx] cvx [0 /exch cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub mul 0.11 add /ge cvx [1 &cwt sub 0.59 mul 0.11 add /sub cvx &cwt 0.59 mul 0.30 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx 1] cvx [0 /exch cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.11 &cwt 0.30 mul add /ge cvx[&cwt 0.30 mul 0.11 add /sub cvx 1 &cwt sub 0.30 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx 1] cvx [ &cwt 0.30 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx /exch cvx 0 /exch cvx ] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} {/setgray [ /dup cvx 0.30 1 &cwt sub 0.11 mul add /ge cvx[ 1 /exch cvx 1 &cwt sub 0.11 mul 0.30 add /sub cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx ] cvx [ 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx 0 /exch cvx] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} ] &cbar get exec exec} bind def /beige {0.10 settint} def % examples of convenience operators /aqua {0.52 settint} def /blue {0.67 settint} def /lime {0.44 settint} def /red {0 settint} def /green {0.33 settint} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % aqua % normal for blat %! % X E % Z % MUSE.116.Y gonzo begin ps.util.1 begin printerror nuisance begin longjob statusdict begin % statusdict /setduplexmode known {true setduplexmode} if end systemdict /setstrokeadjust known {true setstrokeadjust} if /mastergray {0.96} def % sets overall light grade shade %%%%%%%%%%%%%%%%% % Here's some needed routines not yet in GUTILITY.PTL or GONZO13A.PTL %............... % roundbox draws a box path with rounded corners and locks you to the % lower lefthand box corner using this format ... % -xpos- -ypos- -yheight- -cornerrad- roundbox /roundbox {gsave /rad exch def /bt exch def /br exch def /bb exch def /bl exch def bl bb translate rad mark br 2 div 0 0 0 0 bt br bt br 0 br 2 div 0] roundpath} def % vrule gives a fixed vertical rule, inputting xpos ystart yend linewidth /vrule {gsave newpath setlinewidth 2 index 4 2 roll moveto exch lineto 0 setgray stroke grestore} def % hrule gives a fixed horizontal rule, inputting ypos xstart xend linewidth /hrule {gsave newpath setlinewidth 1 index 4 2 roll moveto lineto 0 setgray stroke grestore} def % mergestr is a tool useful for page numbers; evenutally it will go % into the nuisance dictionary /mergestr {2 copy length exch length add string dup dup 4 3 roll 4 index length exch putinterval 3 1 roll exch 0 exch putinterval} def % this is a repeat of the GONZO13B callout width proc ... gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end gonzo begin % This is the core keystone code routine. It works by taking an average % of the first two and last two string lengths to determine the keystone % slope, increment, and starting width. It then checks the length of % each line and extends the starting width as needed so everything fits. /keyproc {/kadj exch def /msg exch def /yy1 exch def /xx1 exch def mark {msg (\n) search {exch pop exch /msg exch def dup length 0 le {pop} if}{dup length 0 le {pop} if exit} ifelse} loop ] /karray exch def 0 0 karray 0 get cw 0 0 karray 1 get cw add 2 div dup 0 0 karray dup length 1 sub get cw 0 0 karray dup length 2 sub get cw add 2 div sub neg karray length 1 sub div dup /kinc exch def 2 div sub /kstart exch def /txtwide 10000 def 0 0 1 karray length 1 sub {/kpn exch def 0 0 karray kpn get cw kstart kinc kpn mul add sub 2 copy lt {exch} if pop} for kstart add 1.01 mul dup /kstart exch def /txtwide exch def /justifylastline true def 0 1 karray length 1 sub { /posn exch def yy1 xx1 kstart kadj exch posn karray exch get cf /txtwide txtwide kinc add def /xx1 xx1 kinc kadj def /yy1 yy1 yinc sub def} for} def % these are the three keystone routines. Use xpos ypos true (msg strings) % cck, etc. true for keystone; false for ordinary justify. /cck {save /keysnap exch def exch {{2 div sub} keyproc} {cc} ifelse keysnap restore} def % callout centered keystone /clk {save /keysnap exch def exch {{pop} keyproc} {cl} ifelse keysnap restore} def % callout left keystone /crk {save /keysnap exch def exch {{sub} keyproc} {cr} ifelse keysnap restore} def % callout right keystone end % close gonzo dictionary %%%%%% doembeddedproc executes |/name installdoembeddedproc links it /doembeddedproc {mark 50 {stringmode {getstringchar}{currentfile read} ifelse not {exit} if dup dup dup 32 eq exch 13 eq or exch 10 eq or {pop exit} if} repeat counttomark dup string /pstr1 exch def 1 sub -1 0 {pstr1 3 1 roll exch put} for pstr1 exch pop cvx exec} def /installdoembeddedproc {gonzo begin commands (/) 0 get {doembeddedproc} put end} def installdoembeddedproc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % HACK III TEMPLATE % This default gonzo page making template is a useful starting point for % creating your own custom templates. It allows multiple page documents % with full picture insertions and total text control. % Note that any template MUST have an internal proc named templatestartup % and that your template MUST NOT call gonzofont before run time. 300 dict /muse3 exch def muse3 begin /templatefonts { % Remember: all fonts MUST defer till run time! /font0 /Times-Bold [54 0 0 54.1 0 -32] gonzofont /font1 /Times-Roman [9.75 0 0 9.75 0 0] gonzofont /font2 /Times-Italic [9.75 0 0 9.75 0 0] gonzofont /font3 /Times-Bold [9.75 0 0 9.77 0 -6] gonzofont /font4 /Times-Roman [9 0 0 9 0 0] gonzofont /font5 /Times-Italic [9 0 0 9 0 0] gonzofont /font6 /Times-Bold [9 0 0 9 0 0] gonzofont /font7 /Helvetica [9 0 0 9 0 0] gonzofont /font8 /Helvetica [8 0 0 8 0 0] gonzofont /font9 /Helvetica-Bold [9 0 0 9.1 0 4] gonzofont /font- /ZapfDingbats [9 0 0 9 0 0] gonzofont /font= /Symbol [9 0 0 9.1 0 -0.5] gonzofont } def % normallisting is used by the GURU figures for long text ... /normallisting { /txtwide bw 10 sub def /ybot -99999 def /font0 /Helvetica-Bold 12 gonzofont /font1 /Helvetica 8.5 gonzofont /font2 /Helvetica-Oblique 8.5 gonzofont /font3 /Helvetica-Bold 8.5 gonzofont /font4 /Courier 8.5 gonzofont /ypos bt 20 sub def /xpos bl 20 add def /yinc 10 def /pmnorm 60 def /amacro {(Lhy) stringmacro} def /bmacro {(1py) stringmacro} def /cmacro {(3z) stringmacro} def} def % denselisting is used by GURU figures for tighter text /denselisting{/bc br bl sub 2 div bl add def /txtwide bw 10 sub def /ybot -99999 def /font0 /Helvetica-Bold 10 gonzofont /font1 /Helvetica 7 gonzofont /font2 /Helvetica-Oblique 7 gonzofont /font3 /Helvetica-Bold 7 gonzofont /font4 /Courier 7 gonzofont /ypos bt 10 sub def /xpos bl 6 add def /yinc 8 def /amacro {(hy) stringmacro} def /emacro {/yparendadj yinc 2 div def} def} def % values used by gonzo justify ... /cstretch 0.1 def % minimum character kerning /sstretch -0.2 def % minimum space kerning /dropcount 4 def % number of lines drop cap drops /lastlinestretch 0.06 def % open last paragraph line slightly /pm 10 def % use paragraph indents /yinc 10.5 def % line spacing /ypara 0 def % extra interparagraph spacing /pagenum 1 def % These macros handle an initial drop cap and low center subheads ... /amacro {(zyL0) stringmacro /ypos ypos ypara add def} def % start drop cap /bmacro {(iFy1) stringmacro /ypos ypos ypara add def} def % finish drop cap /cmacro {staytint1 (znyC3) stringmacro /ypos ypos ypara 2 mul add def} def % centered title /dmacro {black (pF1) stringmacro /ypos ypos ypara 2 mul add def} def % normal text after centered title % reference values for internal doc control that become calculated % array values. Note that it is best to work in fixed yinc heights % to prevent alignment problems under figures. Note that it is nearly % always best to AVOID FIXED VALUES IN DOCMATRIX. /txw 155 def % width of normal text columns /cmb 60 def % column bottom position /cmt cmb 60 yinc mul add def % page is 60 normal text lines high /cml 60 def % first column left margin /cms 170 def % spacing of normal columns /cm# 3 def % number of normal columns /cm1 cml def % c1 starts at left margin /cm2 cml cms add def % c2 in middle /cm3 cml cms 2 mul add def % c3 to right /cmw cms txw sub def % white space between columns /hdw cms 2 mul txw add def % normal header/footer width /hdc cm1 hdw 2 div add def % normal header/footer center /hdr cm1 hdw add def % normal header/footer right /hdl cm1 def % normal header left /fdp 14 def % amount of footer drop below cml /bh1 yinc 6 mul def % 8 vlines reserved for title & blurb /stdfigrad 0.1 def % radius of standard figure box /1colwide txw def % width of single column figure /2colwide txw cms add def % width of double column figure /3colwide txw cms 2 mul add def % width of triple column figure /f1h yinc 31 mul def % height of figure one /f2h yinc 26 mul def % height of figure two /f3h yinc 27 mul def % height of figure three /f4h yinc 14 mul def % height of figure four /f5h yinc 25 mul def % height of figure five /f6h yinc 35 mul def % height of figure six /s1h yinc 21 mul def % height of custom sidebar /s2h yinc 32 mul def % height of n/n sidebar /a1h yinc 66 mul def % height of synergetics ad /h1h yinc 14 mul def % height of optional help box /tfa {yinc 1.5 mul add} def % upper figure position adjust % warning: second true must stay that way; must use blank namek /fig1 {cm2 cmb 1 sub 2colwide f1h true % 2 sub adjust for gray top true /f1name /figure1 stdmusefig} def % link /fig2 {cm1 cmt f2h sub yinc add 3 add 2colwide f2h true true /f2name /figure2 stdmusefig} def % link /fig3 {cm1 cmb 1 sub 2colwide f3h true true /f3name /figure3 stdmusefig} def % link /fig4 {cm1 cmt f4h sub yinc add 3 add 2colwide f4h true true /f4name /figure4 stdmusefig} def % link /fig5 {cm1 cmt f5h sub yinc add 3 add 1colwide f5h true true /f5name /figure5 graymusefig} def % link /fig6 {cm2 cmb 3 sub yinc add 4 add 2colwide f6h true true /f5name /figure6 stdmusefig} def % link /ad1 {cm3 cmb 1colwide f5h false true /ad1name /ad1copy stdmusefig} def % link /side1 {cm1 cmt s1h sub yinc add 3colwide s1h true true /s1name /sidebar1 grayfig2} def % link /side2 {cm1 cmt s2h sub yinc add 2colwide s2h true true /s2name /sidebar2 grayfig2} def % link /help {cm2 % cmt 16 yinc mul sub cmb 4 sub 1colwide h1h true false /helpname /hackhelp graymusefig} def % this is a "standard" figure border for HACK3. It has rounded edges, % a bottom single line title, and links to the actual figure art... /narrowfig 0 def % narrowing option /stdmusefig { /jsave justx 4 get def save /stdsnap exch def grayfig {0 3 translate} if % shift /colcheck {} def /figproc exch def cvx /figname exch def /showtitle exch def /showborder exch def /figheight exch def narrowfig sub /figwidth exch def -10 add translate /linestring linestring2 def /pmrun 0 def /txtwide figwidth 2 sub def /font1 /Helvetica 9 gonzofont /yinc 10 def /oktoprint false def /oktoadvance true def /xpos 0 def /ypos 0 def figname stringgonzo /titadjust ypos neg def /oktoprint true def /bw figwidth def /bt figheight def /bl 0 def /bb 0 def /bc figwidth 2 div def /xpos 20 def /ypos bt 20 sub def showtitle {0 narrowfig 2 div add titadjust figname cf} if showtitle not {/titadjust 0 def} if % no suppression if no title showborder {1 narrowfig 2 div add titadjust 12 add figwidth 2 sub figheight titadjust sub 10 sub stdfigrad roundbox 0.5 setlinewidth grayfig {gsave % LaserWriterG {0.90}{0.95}ifelse setgray grayshade setgray fill grestore [2.5 0 1.5 1] superstroke } {stroke} ifelse} if /linestring linestring2 def % needed to run interference /cstretch 0.01 def /sstretch 0.01 def /pmrun 0 def /colcheck {} def 3 1 roll translate dup scale % adjust figure position mark figproc cvx exec cleartomark stdsnap restore justx 4 jsave put } def /grayfig false def % show stdmusefig with gray background default /graymusefig {/grayfig true def stdmusefig /grayfig false def} def %%%% % has a title box /grayfig2rad 0.01 def /showboxgrays true def /grayfig2 { /jsave justx 4 get def save /stdsnap exch def /colcheck {} def /figproc exch def cvx /figname exch def /showtitle exch def /showborder exch def /figheight exch def /figwidth exch def translate showborder {1 2 figwidth 2 sub figheight 5 sub grayfig2rad roundbox 0.4 figheight 28 sub moveto figwidth 1.8 sub 0 rlineto gsave showboxgrays {mastergray setgray}{1 setgray} ifelse fill grestore gsave newpath 0 figheight 5 sub moveto figwidth 1.8 sub 0 rlineto 0 -23 rlineto figwidth 1.8 sub neg 0 rlineto closepath grayshade dup 1 ne {0.15 sub} if setgray fill grestore [2 0 1 1] superstroke } if /font7 /Helvetica-Bold 9 gonzofont showtitle { 0.25 setgray % 0.25 setgray figwidth 2 div figheight 20 sub font7 figname cc black} if /bw figwidth def /bt figheight def /bl 0 def /bb 0 def /bc figwidth 2 div def /xpos 20 def /ypos bt 20 sub def /cstretch 0 def /sstretch 0 def /lastlinestretch 0 def /pmrun 0 def /ypara 0 def /linestring linestring2 def 3 1 roll translate dup dup /csf exch def scale mark figproc cvx exec cleartomark stdsnap restore justx 4 jsave put } def %%% % Here is the master document control matrix. It is manual in this example % Note that the result of internal calcs are ORDINARY NUMBERS. Note also % that you make room for figures by adding or subtracting only where and % as needed. /docmatrix [ [ { } { } {/narrowfig 0 store } ] % initial document files [ [{titleblock} % xpos ypos scale name {rightfooter} {0 0 0.9 fig1} ] % page one figures and control [ cm1 cmt bh1 sub cmb {txw}] % column1 xpos ypos ylimit txtwide [ cm2 cmt bh1 sub cmb f1h add {txw} ] % column2 [ cm3 cmt bh1 sub cmb f1h add {txw} ] % column3 ] [ [{leftfooter} {leftheader} {/narrowfig 50 store} {0 0 0.9 fig2} % {/narrowfig 0 store} {0 0 0.9 fig3} ] % page two figures and control [ cm1 cmt f2h sub cmb f3h add {txw}] % column1 xpos ypos ylimit txtwide [ cm2 cmt f2h sub cmb f3h add {txw}] % column2 xpos ypos ylimit txtwide [ cm3 cmt cmb {txw} ] % column3 xpos ypos ylimit txtwide ] [ [{rightfooter} {rightheader} % {16 -34 0.9 fig3} {/narrowfig 50 store} {0 0 0.9 fig4} {/narrowfig 0 store} % {12 -20 0.9 fig5} ] % page three figures and control [ cm1 cmt f4h sub cmb {txw}] % column1 ship [ cm2 cmt f4h sub cmb {txw}] % [ cm3 cmt cmb {txw}] % yinc sub?? ] [ [{leftfooter} {leftheader} {/namestretch 3 def} {15 0 0.85 side1} {0 -6 1 help} % temp help box ] % page four figures and control [ cm1 cmt s1h sub cmb {txw}] % special yinc no caption [ cm2 cmt s1h sub cmb h1h add {txw}] [ cm3 cmt s1h sub cmb {txw}] ] [ [{rightfooter} {rightheader} {0 31 21 add 1 ad1} {/namestretch 2 def} {15 0 0.85 side2} ] % page five figures and control [ cm1 cmt s2h sub cmb txw] % column1 xpos ypos ylimit txtwide [ cm2 cmt s2h sub cmb txw] % column2 xpos ypos ylimit txtwide % [ cm3 cmt cmb txw] % column3 xpos ypos ylimit txtwide ] /adj {21 yinc mul add } def [ [{leftfooter} {leftheader} % {-5 -35 1 fig4} % {/namestretch 0 def} % {14 0 0.85 side2} % {18 -24 0.9 fig4} % {4 -17 0.9 fig5} ] % page six figures and control [ cm1 cmt cmb adj txw] % column1 xpos ypos ylimit txtwide [ cm2 cmt cmb adj txw] [ cm3 cmt cmb txw] ] % change [ {quit} ] to [ {exitproc} ] [[{}] [cm1 cmt cmb txw]] % possible blank page ? [[{}] [cm2 cmt cmb txw]] % possible blank page ? [[{}] [cm3 cmt cmb txw]] % possible blank page ? % leave [ {quit} ] at end of page setup file [ {exitproc} ] % final document wrapup % NOTE: will not execute with short copy! ] def /nextpage { showpage adjustpage /pagenum pagenum 1 add def docpage numpages lt { /docpage docpage 1 add def docmatrix docpage get /curpage exch def curpage length 1 sub /numpgcol exch def curpage 0 get {cvx exec} forall /curcol 1 def nextcol} {docmatrix curpage 1 add get {cvx exec} forall } ifelse } def % modified nextcol allows pages without text and deferred xpos calcs. /nextcol { numpgcol 0 gt { curpage curcol get aload pop exec /txtwide exch def exec /ylimit exch def exec /ypos exch def exec /xpos exch def /curcol curcol 1 add def}{ nextpage} ifelse} def /colcheck { ypos ylimit 1 sub le { curcol numpgcol gt {nextpage} {nextcol} ifelse} if } def /templatestartup { templatefonts font1 /gonzojust true def /rslashok true def docmatrix length /numpages exch def /docpage 1 def docmatrix 0 get {cvx exec} forall % do initial document files docmatrix docpage get /curpage exch def curpage length 1 sub /numpgcol exch def curpage 0 get {cvx exec} forall % do initial page files /curcol 1 def nextcol } def % titleblock, headers and footers /titleblock {save /blurbsnap exch def /colcheck {} def /cstretch 0.2 def sstretch 1 def cml cmt bh1 sub 15 add translate /blurbboxwide 180 def /blurbboxhigh 80 def 1 setlinecap bestgray 3 23 mt hdw 15 sub blurbboxwide sub 3 sub 23 lineto hdw 3 sub 23 moveto -10 0 rlineto [6 0.3 4.5 .85] superstroke % changed to brown hdw blurbboxwide sub 15 sub 0 blurbboxwide blurbboxhigh 5 roundbox gsave grayshade setgray fill grestore % temp expt [4 0.3 2.5 .85] superstroke 0.85 setgray 4.5 setlinewidth -5 23 mt 3 r blurbboxwide 1 add 23 mt 3 r stroke grestore 0.3 setgray /font0 /Palatino-Bold 30 gonzofont /font1 /Palatino-Bold 10 gonzofont 0.2 setgray /font2 /Palatino-Bold 12 gonzofont font2 4 62 7 add author cl font0 3 34 4 add titlename cl font2 4 7 titledate cl 0.15 setgray /yinc 12 def hdw font1 105 sub 60 dokeystone titleblurb cck blurbsnap restore} def /leftheader {save /blurbsnap exch def /colcheck {} def cml cmt 16 add translate gsave mastergray setgray 0 8 mt 16 setlinewidth hdw r grestore % color fill? 0 0 hdw 1.2 hrule 0 16 hdw 0.5 hrule /cstretch 0.2 def /sstretch 1 def /font2 /Palatino-Bold 11 gonzofont 0 4.5 leftheading cl blurbsnap restore} def /rightheader {save /blurbsnap exch def /colcheck {} def cml cmt 16 add translate gsave mastergray setgray 0 8 mt 16 setlinewidth hdw r grestore % color fill? 0 0 hdw 1.2 hrule 0 16 hdw 0.5 hrule /cstretch 0.2 def /sstretch 1 def /font2 /Palatino-Bold 11 gonzofont hdw 4.5 rightheading cr blurbsnap restore} def /leftfooter { save /blurbsnap exch def /colcheck {} def cml cmb 13 sub translate /txtwide 1000 store /font3 /Helvetica 4.5 gonzofont font3 hdw -6 (Copyright c 1998 by Don Lancaster and Synergetics (520) 428-4073 \ www.tinaja.com \ All commercial rights and all electronic media rights fully reserved. Reposting expressly forbidden.) cr 0 0 hdw 0.8 hrule gsave 25 0 translate -18 -7 36 14 2 roundbox gsave mastergray setgray fill grestore 0.5 setlinewidth stroke /font2 /Palatino-Bold 11 gonzofont /cstretch 0.4 def 16 2 add 0.2 setgray 3.5 columnum ( ) cvs (.) mergestr colpagenum ( ) cvs mergestr cc blurbsnap restore /colpagenum colpagenum 1 add def } def % adjusted for 100 - was -16 -7 32 14 /rightfooter {save /blurbsnap exch def /colcheck {} def cml cmb 13 sub translate /txtwide 1000 store /font3 /Helvetica 4.5 gonzofont font3 0 -6 (Copyright c 1998 by Don Lancaster and Synergetics (520) 428-4073 www.tinaja.com \ All commercial rights and all electronic media rights fully reserved. Reposting expressly forbidden.) cl 0 0 hdw 0.8 hrule gsave hdw 25 sub 0 translate -18 -7 36 14 2 roundbox gsave mastergray setgray fill grestore 0.5 setlinewidth stroke /cstretch 0.4 def /font2 /Palatino-Bold 11 gonzofont 16 2 add 3.5 0.2 setgray columnum ( ) cvs (.) mergestr colpagenum ( ) cvs mergestr cc blurbsnap restore /colpagenum colpagenum 1 add def} def end % guru3 template %% TEMP BYPASSES %%% /adjustpage {} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % INCLUDED FILES AND PROCS /dokeystone false def /titleblurb (PIC |jCalibar |jtv |jgenerator Investigating Brown's gas Television |j|jbroadcast|j|j mags Understanding meta studies Comparing|j|j energy|j|j densities) def /author (Don Lancaster's) def /titlename (T|k|kech M|k|kusings) def /titledate (January, 1998 |j) def /leftheading ( Tech Musings) def /rightheading titledate def /columnum 120 def /colpagenum 1 def %%%%%%%%%%%%% COMMON HEADER %%%%%%%%%%%%%%%%% % graybox utilities /grayfill {gsave bl bb translate /doublestroke true def 0 0 moveto 0 bh lineto bw bh lineto bw 0 lineto closepath mastergray setgray fill grestore} def /whitebox {gsave /wh exch def /ww exch def translate 0 0 mt 0 wh rlineto ww 0 rlineto 0 wh neg rlineto closepath gsave white fill grestore line1 stroke} def % keeps state! /doublestroke true def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /figure1 { % name of textfile: muse.fig.120.1 Calibar and patterns % ............................ save /snap1 exch def systemdict /setstrokeadjust known {true setstrokeadjust} if % name of textfile: % .... electronics begin % bl 5 add bb 5 10 setgrid 4 0 10 setgrid % 30 25 showgrid /cstretch 0.02 def /sstretch 0.0 def /kern 0.1 def /yinc 1.1 def /font0 /Helvetica-Bold [1.2 0 0 1 0 -0.2] gonzofont /font1 /Helvetica 0.85 gonzofont /font4 /Helvetica 0.7 gonzofont /font3 /Helvetica-Bold 0.70 gonzofont /font2 /Helvetica-Oblique 0.75 gonzofont /font5 /Helvetica-Bold [1.6 0 0 1.1 0 0] gonzofont /font6 /Helvetica-Bold [2 0 0 1.4 0 0] gonzofont /font7 /Helvetica [0.6 0 0 0.6 0 -.3] gonzofont /font8 /Symbol 0.9 gonzofont /font6 /MyriadMM_350_wt_700_wd [1.2 0 0 1.2 0 0 ] gonzofont font1 /calibar {gsave translate 0 0 mt 3 pu 26 pr 3 pd closepath 0.5 settint gsave grayshade setgray fill black grestore line1 stroke gsave 0 setlinecap 0.3 setlinewidth -1.6 0.5 mt 2 u grestore gsave 0.5 settint grayshade dup 1 ne {0.15 sub}if setgray 25.2 0 mt 3 pu 0.8 pr 3 pd closepath fill grestore line1 black 26 0 mt 3 u black 25.2 0 mt 3 u [{25.2 0 mt 0.8 r} 0.25 13] yrpt -0.2 0.75 mt 2 pl 1.5 pu 2 pr gsave closepath white fill grestore line2 stroke 0 0.3 mt 0.2 pl 2.4 pu 0.2 pr stroke 14.5 1.5 0.4 0 360 arc black fill red grayshade 1 ne {0.33}{0} ifelse setgray 12.5 1.5 0.3 0 360 arc fill beige black font6 21.2 1.1 (C|j|jA|j|jL|j|jI|j|jB|j|jA|j|jR) cc grestore} def /penclip {gsave translate 0.5 settint /tension 2.2 def [ 0 0.4 -100 -1 0.4 100 ] curvetrace 4 pl -0.4 -0.4 rlineto 2.5 pd 2 pl 2.7 pu 2 pr 0.4 0.4 rlineto 5 pr 0.2 pd gsave closepath grayshade dup 1 ne {0.15 sub} if setgray fill grestore black line1 stroke grestore} def 5.5 24 calibar 14 27 penclip beige 2 2 mt 18 pu 31 pr 18 pd closepath grayshade setgray fill 2 19.5 mt 2.3 pu 31 pr 2.3 pd closepath grayshade dup 1 ne {0.15 sub} if setgray fill black /tabs [16] def font5 grayshade 1 ne {0.33}{0} ifelse setgray 17.5 20.3 (|5CALIBAR PATTERNS) cc font1 black /yinc 1.3 def /kern 0.08 def 3 18 ( 1 - SMPTE multipurpose bars |t13 - EIA bars plus PLUGE 2 - Multiburst FCC frequency check |t14 - Green pure color screen 3 - Modulated gain|j/|jphase ramp |t15 - Blue pure color screen 4 - Blackburst 7.5 IRE plus sync |t16 - Blackburst 0 IRE 5 - White 100 IRE screen |t17 - Magenta pure color screen 6 - Luminescence ramp 0|j-|j100 IRE |t18 - Cyan pure color screen |h 7 - 5 MHz sweep plus markers |t19 - Chroma bars plus red 8 - B|j/|jW Crosshatch generator |t20 - B|j/|jW convergence dots 9 - Red pure color screen |t21 - Chroma 5 step IRE 20 10 - Luminance IRE 10 step |t22 - Full field color bars 11 - Luminance 5 step IRE 20 |t23 - Chroma 10 step IRE 10 12 - SMPTE plus FCC multiburst |t24 - NTC7 composite sin-square ) cl font1 black /yinc 0.9 def 31.5 29 (battery\naccess) cc 20.5 29 (program\nbutton) cc 17 29 (status\nled) cc 3.7 29 (BNC video\noutput) cc 7.7 29 (pen\nclip) cc end ypos snap1 restore /ypos exch def } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /figure2 { % name of textfile: muse.fig.120.2 NTSC color wheel % ............................ save /snap2 exch def systemdict /setstrokeadjust known {true setstrokeadjust} if electronics begin 3 17 10 setgrid % 30 25 showgrid /cstretch 0.02 def /sstretch 0.0 def /kern 0.1 def /yinc 1.1 def /font0 /Helvetica-Bold [1.2 0 0 1 0 -0.2] gonzofont /font1 /Helvetica 0.85 gonzofont /font4 /Helvetica 0.7 gonzofont /font3 /Helvetica-Bold 0.70 gonzofont /font2 /Helvetica-Oblique 0.75 gonzofont /font5 /Helvetica-Bold [2 0 0 1.4 0 0] gonzofont /font6 /Helvetica [2 0 0 1.4 0 0] gonzofont /font7 /Helvetica [0.6 0 0 0.6 0 -.3] gonzofont /font8 /Symbol 0.9 gonzofont /font6 /Symbol 0.75 gonzofont /trialhsb {gsave translate grayshade 1 ne { 0.4 setlinewidth 0 2.5 360 {/ang exch store gsave ang 33 add 7 sub rotate 1 -0.03 0 { /len exch store ang 360 div len 1 sethsbcolor % 0 0 mt % 0 len 8 mul rlineto stroke} for 0 len 8 mul mt 0 0.03 8 mul rlineto stroke } for grestore } for } if % grayshade 1 ne {0.33}{0} ifelse setgray black newpath 0 0 8.24 0 360 arc beige line3 stroke % -90 rotate % 8.5 0 (0) cc % 45 rotate % 8.5 0 (45) cc gsave /vals [(|j|j|j|j|j0|8\260) (|j|j|j45|8\260) (|j|j|j90|8\260) (|j|j|j135|8\260) (|j|j|j180|8\260) (|j|j|j225|8\260) (|j|j|j270|8\260) (|j|j|j315|8\260) ] def -90 rotate font1 0 1 7 {/ptr exch store 0 8.24 mt 1 u black 0 9.6 vals ptr get cc 45 rotate } for grestore gsave -103 rotate font0 /vals [[(BLUE) .67] [(MAGENTA) .83][(RED) 0] [(YELLOW) 0.16] [(GREEN) 0.33][ (CYAN) 0.5]] def 0 1 5 {/ptr exch store vals ptr get 1 get settint grayshade 1 ne {0.50}{0} ifelse setgray 0 11.5 vals ptr get 0 get cc 60 rotate } for grestore black font1 /yinc 0.9 store 11.9 12 (chroma\np|jh|ja|js|je\nangle in\ndegrees) cc grestore} def 15 11.5 trialhsb end ypos snap2 restore /ypos exch def } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /figure3 { % name of textfile: muse.fig.120.3 Calibar block diagram % ............................ save /snap3 exch def systemdict /setstrokeadjust known {true setstrokeadjust} if electronics begin 0 -10 10 setgrid %30 25 showgrid /cstretch 0.02 def /sstretch 0.0 def /kern 0.1 def /yinc 1.1 def /font0 /Helvetica-Bold 1.2 gonzofont /font1 /Helvetica 0.85 gonzofont /font4 /Helvetica 0.7 gonzofont /font3 /Helvetica-Bold 0.70 gonzofont /font2 /Helvetica-Oblique 0.75 gonzofont /font5 /Helvetica-Bold [2 0 0 1.4 0 0] gonzofont /font6 /Helvetica [2 0 0 1.4 0 0] gonzofont /font7 /Helvetica [0.6 0 0 0.6 0 -.3] gonzofont /font8 /Symbol 0.9 gonzofont /font6 /Symbol 0.75 gonzofont /kern 0.1 def /box46 {gsave /callout exch store translate 0 0 mt 4 pu 6 pr 4 pd closepath /yinc 0.9 def gsave grayshade setgray fill grestore grayshade 1 ne {0.33}{0} ifelse setgray line2 stroke black font1 3 2.8 callout cc grestore} def /phonojackleft { gsave translate line1 0 0 mt 1 l 0 0 mt circ2 newpath 0 0 0.5 145 -145 arcn line2 stroke line1 0 -0.5 mt dot 0 -0.4 mt 1.4 d ground grestore} def /pb {gsave translate white 0 setlinecap 0 0 mt 1.5 r black 1 setlinecap line3 0 0.55 mt 1.5 r 0.75 l 0.65 u 0 0 mt circ1 1.5 0 mt circ1 grestore} def /ddiode { gsave moveto 90 rotate diode grestore} def /led { gsave translate 90 rotate 0 0 mt currentpoint circ3 gsave black line1 0 -1 mt 2 u grestore ddiode } def line1 26 20 32 22 mt 20 l 16 22 mt rarrow 24 22 mt rarrow 11 20 mt 14 d 9.5 20 mt 3 d 2.5 l 2 d 12.5 20 mt 3 d 2.5 r 2 d 9.5 20 mt uarrow 11 20 mt uarrow 12.5 20 mt uarrow 9.5 9 mt 1.5 u 2.5 l 1.5 u 7 12 mt uarrow 12.5 9 mt 1.5 u 2.5 r 1.5 u 15 12 mt uarrow 8 6 mt 2 l 2 u 2 r gsave 6 7 translate 90 rotate 0 0 hxtal grestore 32 22 phonojackleft black line1 14 8 mt 4.5 r rground 14 6 mt 4.5 r rground 15.75 8 pb gsave red grayshade 1 ne {0.33}{0} ifelse setgray 16.5 6 led grestore beige 8 20 (EPROM\npattern\ngenerator) box46 16 20 (|h\n10-bit D/A\nconverter) box46 24 20 (controlled\nbandwidth\n video driver) box46 4 12 (4-bit\nbinary\ncounter) box46 12 12 (data\nvalid\nlatch) box46 8 5 (PIC16C57\ntiming\ngenerator) box46 black /yinc 0.9 def font4 6 4 (14.318\nMHz) cc font4 8.8 18.8 (low\naddresses) cr 13.2 18.8 (mid\naddresses) cl font1 32 18.7 (NTSC\nvideo\nout) cc end ypos snap3 restore /ypos exch def } def % /figure3 {} def %%%% /figure4 { % name of textfile: muse.fig.120.4 energy densities % ............................ save /snap4 exch def electronics begin -85 -26 12 setgrid % 30 30 showgrid /cstretch 0.02 def /sstretch 0.0 def /kern 0.1 def /yinc 1.1 def /font0 /Helvetica-Bold [1 0 0 1 0 -0.2] gonzofont /font1 /Helvetica 0.85 gonzofont /font4 /Helvetica 0.7 gonzofont /font3 /Helvetica-Bold 0.70 gonzofont /font2 /Helvetica-Oblique 0.75 gonzofont /font5 /Helvetica-Bold [2 0 0 1.4 0 0] gonzofont /font6 /Helvetica [2 0 0 1.4 0 0] gonzofont /font7 /Helvetica [0.6 0 0 0.6 0 -.3] gonzofont /font8 /Symbol 0.9 gonzofont /font6 /Symbol 0.75 gonzofont /tabs [8 14 ] def 9 4.5 mt 7 pu 19 pr 7 pd closepath grayshade setgray fill 16 4.5 mt 7 pu 14.5 pr 7 pd closepath grayshade dup 1 ne {0.15 sub} if setgray fill black font1 10 10 (Gasoline |t9000 Wh/l |t13,500 Wh/Kg Lithium |t350 Wh/l |t150 Wh/Kg Flywheel |t210 Wh/l |t120 Wh/Kg Lead Acid |t40 Wh/l |t25 Wh/Kg Hydrogen |t3.5 Wh/l |t39,000 Wh/Kg) cl end ypos snap4 restore /ypos exch def } def %%%%%% /figure5 { % name of textfile: muse.fig.116.5 HTML error codes % ............................ save /snap1 exch def %%%%%%%%%%%%%%%%%%% electronics begin bestgray bl 5 add bb 5 add 10 setgrid % 16 35 showgrid /cstretch 0.02 def /sstretch 0.0 def /kern 0.1 def /yinc 1.1 def /font0 /Helvetica-Bold [1.2 0 0 1 0 -0.2] gonzofont /font1 /Helvetica 0.75 gonzofont /font4 /Helvetica 0.7 gonzofont /font3 /Helvetica-Bold 0.70 gonzofont /font2 /Helvetica-Oblique 0.75 gonzofont /font5 /Helvetica-Bold [2 0 0 1.4 0 0] gonzofont /font6 /Helvetica [2 0 0 1.4 0 0] gonzofont /font7 /Helvetica [0.6 0 0 0.6 0 -.3] gonzofont /font8 /Symbol 0.9 gonzofont /font6 /Symbol 0.75 gonzofont font1 end ypos snap1 restore /ypos exch def } def %%%%%% /namestretch 0 def /sidebar1 { 8 -3 translate 1 dup scale % adjust to fit /title( )def /font0 /Helvetica [10 0 0 8.5 0 0] gonzofont /font1 /Helvetica [9 0 0 9 0 0] gonzofont /font2 /Helvetica-Bold [9 0 0 9 0 0 ] gonzofont /txtwide 156 def /yinc 11 def % RSNUMBER /Zmacro {gsave /Helvetica-Narrow-Bold findfont [7.5 0 0 7.5 0 0] makefont setfont xpos ypos moveto charstretch 0(CIRCLE ) ashow charstretch 0 RSnumber( ) cvs ashow ( ON FREE INFORMATION CARD) show /RSnumber RSnumber 1 add def /ypos ypos yinc 0.7 mul sub def grestore} def /Ymacro {/ypos ypos yinc 0.7 mul sub def} def % temporary stretch /Zmacro {(h) stringmacro /ypos ypos namestretch sub def } def /ypos0 bt 3 sub def /yinc 17 def /xpos bl def /xpos0 xpos def /pm 0 def /sstretch 0.1 def /cstretch 0.2 def /ypos bt 20 sub def /ypos 400 def /txtwide bw def /colcheck {} def /ytopoflist bt 50 sub csf div def xpos txtwide 2 div add 0 add ytopoflist 18 add % Set name below!!!! ( ) cc % for gray2 /ypos ytopoflist def /columnspacing 158 def /yinc 10 def /xpos0 bl 35 add def /xpos xpos0 def /amacro {/yhold ypos def /ypos ytopoflist def /xpos xpos columnspacing add def /ypos ypos yinc add def} def % temporary for 4 wide /columnspacing 132 def xpos 18 sub ypos (|L|2Bacon's TV Directory|1 332 S Michigan Ave Chicago IL 60604 (312) 922-2400 |Z |2Broadcast Engeering|1 9800 Metcalf Ave Overland Park KS 66212 (913) 967-1737 |Z |2Broadcasting & Cable|1 245 W 17th St New York NY 10011 (212) 337-6942 |Z |2Cable Vision|1 825 7th Ave New York NY 10019 (212) 887-8400 |a |2College Broadcaster|1 71 George St Providence RI 02912 (401) 863-2225 |Z |2Electronic Media|1 740 N Rush St Chicago IL 60611 (312) 649-5293 |Z |2HDTV Report|1 1201 Seven Locks #300 Rockville MD 20854 (800) 777-5006 |Z |2IEEE Comm Journal|1 445 Hoes Ln Piscataway NJ 08855 (908) 981-0060 |Z |a |2Multi Channel News|1 825 7th Ave New York NY 10019 (212) 887-8400 |Z |2Nal Assn Broadcasters|1 1771 N Street NW Washington DC 20036 (202) 429-3931 |Z |2Response TV|1 201 Sandpointe Ave Santa Ana CA 92707 (714) 513-8400 |Z |2Satellite Orbit|1 8330 Boone Blvd Vienna VA 22182 (703) 827-0511 |a |2SMPTE Journal|1 595 W Hartsdale Rd White Plains NY 10607 (914) 761-1100 |Z |2Television Broadcast|1 460 Park Ave S 9th Flr New York NY 10016 (212) 378-0400 |Z |2Television Quarterly|1 111 W 57th St New York NY 10019 (212) 586-8424 |Z |2TV Technology|1 5827 Columbia Pike #310 Falls Church VA 22041 (703) 998-7600 |Z ) cl } def %%%% /sidebar2 { 8 -3 translate 1 dup scale % adjust to fit /title ( ) def /font0 /Helvetica [10 0 0 8.5 0 0] gonzofont /font1 /Helvetica [9 0 0 9 0 0] gonzofont /font2 /Helvetica-Bold [9 0 0 9 0 0 ] gonzofont /txtwide 156 def /yinc 11 def /Ymacro {/ypos ypos yinc 0.7 mul sub def} def /Zmacro {(h) stringmacro} def /ypos0 bt 3 sub def /yinc 17 def /xpos bl def /xpos0 xpos def /pm 0 def /sstretch 0.1 def /cstretch 0.2 def /ypos bt 20 sub def /txtwide bw def /colcheck {} def /ytopoflist bt 50 sub csf div def xpos txtwide 2 div add 0 add ytopoflist 18 add % (|2|CNAMES AND NUMBERS) cc ( ) cc % for new graybox /ypos ytopoflist def /columnspacing 158 def /yinc 10 def /xpos0 bl 35 add def /xpos xpos0 def /amacro {/yhold ypos def /ypos ytopoflist def /xpos xpos columnspacing add def /ypos ypos yinc add def} def /downtwo {/ypos ypos 2 sub def} def % temporary stretch /Zmacro {(h) stringmacro /ypos ypos namestretch sub def } def % temporary for 4 wide % /columnspacing 140 def % /xpos xpos 15 sub def xpos ypos (|L|2Adobe Systems|1 PO Box 7900 Mountain View CA 94039 (800) 833-6687 |Z |2Amazon.com Books|1 Box 80387 Seattle WA 98108 (800) 201-7575 |Z |2BioCard International|1 7500 Old Oak Blvd Cleveland OH 44130 (440) 243-1800 |Z |2Broco|1 2824 N Locust Ave Rialto CA 92377 (909) 350-0580 |Z |2Dallas Semiconductor|1 4401 Beltwood Pkwy S Dallas TX 75244 (972) 371-4448 |Z |2Harris Semiconductor|1 Box 883 Melbourne FL 32902 (407) 724-7000 |Z |2Lindsay Publications|1 PO Box 538 Bradley IL 60915 (815) 935-5353 |Z |a |2McGraw Hill|1 11 West 19th St New York NY 10011 (212) 512-2000 |Z |2Newtek|1 8200 IH 10 W, Ste 900 San Antonio TX 78230 (800) TOASTER |Z |2Science|j/|jAAAS|1 1333 H St NW Washington DC 20005 (202) 326-6400 |Z |2SenSym|1 18404 McCarthy Blvd Milpitas CA 95035 (408) 954-1100 |Z |2Synergetics|1 Box 809 Thatcher AZ 85552 (520) 428-4073 |Z |2Weighing Technology|1 301 Gibraltar Dr Morris Plains NJ 07950 (201) 292-5100 |Z |2John Wiley|1 605 Third Ave New York NY 10158 (212) 850-6088 |Z ) cl } def % temphelp /hackhelp { % nt: hack.help % .. /sstretch 0 def /cstretch 0.1 def /font0 /Helvetica-Bold [8.5 0 0 8 0 0] gonzofont /font1 /Helvetica [8.5 0 0 8 0 0] gonzofont /font2 /Helvetica-Bold [8.5 0 0 8 0 0 ] gonzofont /font7 /Helvetica-Oblique [8.5 0 0 8 0 0] gonzofont /yinc 9.5 def /font2 {font1} def bc bt 15 sub (|0NEED HELP?) cc bl 14 add bt 30 sub (|1Phone or write all your US |2Tech Musings|1 questions to: |h Don Lancaster |2Synergetics|1 Box 809-EN Thatcher, AZ, 85552 (520) 428-4073 |h US email:|j |7don@tinaja.com|1 Web page:|j|j |7www.tinaja.com|1 ) cl } def %%% /f1name (Fig. 1 \261 PEN SIZED AND PIC BASED CALIBAR from NewTek replaces \ a whole studio full of television test instruments. The twenty four \ standard precision test patterns are generated as shown.) def /f2name (Fig. 2 \261 THE NTSC CHROMA SUBCARRIER PHASE determines the \ hue, while its relative amplitude sets the color saturation.)def /f3name (Fig. 3 \261 AN APPROXIMATE BLOCK DIAGRAM of the Calibar. Table \ lookup of 4X chroma samples get provided to ten bit accuracy. The PIC \ controls most table access and does all the synchronization and low \ frequency timing. )def /f4name (Fig. 4 \261 COMPARING SOME POPULAR ENERGY DENSITIES.) def /f5name (Fig. 5 \261 ) def /ad1name ( ) def % dummy /s1name (SOME TELEVISION BROADCASTING RESOURCES) def /s2name (NAMES AND NUMBERS) def /helpname (TEMPCHECK) def /Zmacro {/ypos ypos 1 add def 0 setlinewidth xpos ypos moveto txtwide 0 rlineto stroke /ypos ypos -2 add def} def % hair rule /reprogray {bestgray} def bestgray black /header {} def /setstrokeadjust where {pop /setstrokeadjust true def} if muse3 begin /cstretch 0.2 def /sstretch -0.3 def /showthegrid false def /LaserWriterG false def /boxdraw {bl bb bw bh brad roundbox blw setlinewidth stroke grestore } def /br {bl bw add} def /bb 0 def % picojust patch18 gonzo begin /swallow {/lopspaces lopspaces 1 add def printlist plistlength 1 sub get dup 1 get dup 2 ge {1 sub} if 1 exch put} bind def end /rdiode {gsave 180 rotate diode grestore} def % patch /grayshade 0.92 def % for compatibility /showcolors false def % temp for figure one cieF % BBBBBB % name of textfile: muse.116.z % .... % X E % Z %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is needed to improve post picojustufication... gonzo begin /swallow {/lopspaces lopspaces 1 add def printlist plistlength 1 sub get dup 1 get dup 2 ge {1 sub} if 1 exch put} bind def end /wanttousepicojustify true def % this globally turns picojust on or off %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wanttousepicojustify false 40 array dictstack {/^picoset known or} forall not and { % FILL JUSTIFICATION IMPROVER version 6.3 June 3, 1994. c 1994 by % Don Lancaster & Synergetics (602) 428-4073. [support on GEnie PSRT] % Personal use premitted; All commercial & media rights fully reserved. % Install this where it will redefine all print time uses of % the -awidthshow- operator. Use picojust true or false to control. /picoflag true def % selective availability switch /picofract 0.35 def % percentage of excess space to be internalized /picothresh 0.03 def % percentage increment per font change /^picoset true def % job multiple def lockout /picojust {/picoflag exch store} def % use for local turn on or off /awidthshow {1 index 4 index 6 index add add 32 eq not picoflag not or {//awidthshow}{/^msg exch store pop /^cst exch store pop pop /^sst exch store /^cct ^msg length store /^rwd ^msg stringwidth pop store /^sct 0 ^msg {( ) search {pop pop exch 1 add exch}{pop exit} ifelse} loop store /^jwd ^cct ^cst mul ^sct ^sst mul add store /^saj ^jwd dup ^rwd add dup 0 eq {pop 0.0001} if div picothresh div floor picothresh mul picofract 1.33 mul mul 1 add store gsave ^saj 1 scale /^rft 1 ^saj 1 sub ^rwd mul ^jwd dup 0 eq {pop 0.0001} if div sub ^saj div store ^sst ^rft mul 0 32 ^cst ^rft mul 0 ^msg //awidthshow 1 ^saj div 1 scale grestore ^jwd ^rwd add 0 rmoveto} ifelse} bind def } if %%%%%%%%%%%%% SYNERGETICS AD %%%%%%%%%%%%%%%%%% %! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /ad1copy { save /adsave exch store green staytint % IMPORTANT: Comment or remove the next line to get the ad up to EN page size! % Do this **ONLY** if you are extracting the ad for EN layout! % 1.03 1.09 scale xpos 23 sub ypos 283 sub translate 0.95 0.915 scale %%%% This code puts in the reader service number %%%% /showreaderservicenumber true def % now a catalog /readerservicenumber 146 def /squashad true def /showadgrays true def squashad {1 0.80 scale} if /height 693 114 add 60 add def % stretched twice /width1 165 def /bc width1 2 div def % huh /sidethk 4 def /botheight 54 def /topheight 33 def /outrad 10 def /inrad 5 def /pm 0 def /pmnorm 0 def %%%%%%%%%%%%%% KEYSTONE STUFF %%%%%%%%%%%%%%%%%%%%%%% % this is a repeat of the GONZO13B callout width proc ... gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a subtle correction to the gonzo fill justify that makes % txtwide slightly more precise ... gonzo begin /reallyjustF {swallowandhang roomleft cstretch add numchars 1 sub numspaces spacecharratio mul add dup 0 eq {pop 0.001} if div dup cstretch add /cfix exch def spacecharratio mul sstretch add /sfix exch def /xfix 0 def /yfix 0 def} bind def % unconditional justF end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % KEYSTONE STUFF STARTS HERE gonzo begin % This is the core keystone code routine. It works by taking an average % of the first two and last two string lengths to determine the keystone % slope, increment, and starting width. It then checks the length of % each line and extends the starting width as needed so everything fits. /keyproc {/kadj exch def /msg2 exch def /yy1 exch def /xx1 exch def mark {msg2 (\n) search {exch pop exch /msg2 exch def dup length 0 le {pop} if}{dup length 0 le {pop} if exit} ifelse} loop ] /karray exch def 0 0 karray 0 get cw 0 0 karray 1 get cw add 2 div dup 0 0 karray dup length 1 sub get cw 0 0 karray dup length 2 sub get cw add 2 div sub neg karray length 1 sub div dup /kinc exch def 2 div sub /kstart exch def /txtwide 10000 def 0 0 1 karray length 1 sub {/kpn exch def 0 0 karray kpn get cw kstart kinc kpn mul add sub 2 copy lt {exch} if pop} for kstart add 1.01 mul dup /kstart exch def /txtwide exch def /justifylastline true def 0 1 karray length 1 sub { /posn exch def yy1 xx1 kstart kadj exch posn karray exch get cf /txtwide txtwide kinc add def /xx1 xx1 kinc kadj def /yy1 yy1 yinc sub def} for} def % these are the three keystone routines. Use xpos ypos true (msg strings) % cck, etc. true for keystone; false for ordinary justify. /cck {save /keysnap exch def exch {{2 div sub} keyproc} {cc} ifelse keysnap restore} def % callout centered keystone /clk {save /keysnap exch def exch {{pop} keyproc} {cl} ifelse keysnap restore} def % callout left keystone /crk {save /keysnap exch def exch {{sub} keyproc} {cr} ifelse keysnap restore} def % callout right keystone end % close gonzo dictionary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % outside box 0 0 width1 height 5 roundbox showadgrays {0.3}{0} ifelse setgray % for brown border fill % inside box sidethk botheight width1 sidethk 2 mul sub height topheight sub botheight sub inrad roundbox showadgrays {0.96 setgray}{white} ifelse fill black % shade for web /cstretch 0.7 def /sstretch 1.2 def /font1 /Revue 10 gonzofont /font3 /Revue 9 gonzofont /font4 /Revue [9 0 0 9.05 0 1] gonzofont /font9 /Helvetica-Bold 6.5 gonzofont /font2 /Revue 14 gonzofont font1 % adjust center /bc bc sidethk 2 div add def % top lettering white bc bt 22 add (|1new from) cc bc bt 6 add (|2DON LANCASTER) cc bc -17 (|2SYNERGETICS) cc /yinc 10 def bc -28 (|3B|1ox |3809-EN|1 |1Thatcher, |3AZ 85552 |4(|3520|4)|3 428-4073|1) cc /cstretch 0.1 def /sstretch 0.1 def /font5 /Helvetica-Narrow 8 gonzofont /font6 /Helvetica-Narrow-Bold 10 gonzofont /font7 /Helvetica 6 gonzofont /font8 /Helvetica-Narrow-Bold 8 gonzofont /font: /Helvetica-Bold [5 0 0 4.95 0 6] gonzofont % uneven for distillery /font- /Helvetica-Narrow-Oblique 8 gonzofont black 3 3 (|7FREE US VOICE HELPLINE) cl br 3 sub 3 (|7VISA|j/|jMC) cr /xpos 4 def /txtwide br 8 sub def /yinc 8.5 def /ypos bt 15.5 sub def /amacro {/ypos ypos 2 add def} def /cmacro {/ypos ypos 1 add def} def /kern 0.5 def /bw width1 sidethk 2 mul sub def % obtuse code avoids the arcto bug /bmacro { gsave showadgrays {0.3}{0} ifelse setgray % for brown border 0 ypos translate 0 0 mt 5 [-0.5 30 -0.5 3 bw 1 add 3 bw 1 add 30 ] roundpath 0 -31 rlineto bw 1 add neg 0 rlineto closepath fill newpath 0 0 mt 5 [-0.5 -30 -0.5 -3 bw 1 add -3 bw 1 add -30 ] roundpath 0 31 rlineto bw 1 add neg 0 rlineto closepath fill grestore } def /Umacro {ypos} def xpos ypos (|C|6A|kCTIVE|j|j FILTER|j|j COOKBOOK |h|a |C|6RESEARCH|j|j INFOPACKS |h|F|a |5Don's instant use other oneash-and-carry flat rate consulting. Ask any reasonable technical \ question to get a detailed analysis and report. See |/tinton www.tinaja.com/info01|/info01 \ for specifics. \ |8$75.00|5 |b |a |h |F|5The sixteenth|k (!|j)|k printing of Don's bible on analog op-amp lowpass, bandpass, and highpass active filters. De-mystified instant designs. |8 $28.50|1 |b |a |h |C|6CMOS|j|j AND|j|j TTL|j|j COOKBOOKS |h|a |F|5Millions of copies in print worldwide. |8THE|5 two books for digital integrated circuit fundamentals. About as hands-on as you can get. |8$28.50 |5each.|1 |b |a |h |C|6INCREDIBLE|j|j SECRET |h|c MONEY|j|j MACHINE|j|j II |5|h|F|a Updated 2nd edition of Don's classic on setting up your own technical or craft venture. |8$18.50|1 |b |a |h |C|6LANCASTER|j|j CLASSICS|j|j LIBRARY |5|h|a|F Don's best early stuff at a bargain price. Includes the CMOS Cookbook, The TTL Cookbook, Active Filter Cookbook, PostScript video, Case Against Patents, Incredible Secret Money Machine II, and \ Hardware \ Hacker II reprints. |8$119.50|1 |b |a |h |C|6L|kOTS|j|j OF|j|j OTHER|j|j GOODIES |5|h|a) stringgonzo %%%%%%%%%%%%%%%%%%%%%%%% % (A) WIDTH CALCULATIONS 2.20.91 % A new curwide variable lets you calculate the gonzo string % width independent of printing it. Handy for menu justify, etc.. % Use has to be bracketed with /oktoprint false def /oktoadvance % false def --- stuff --- and then true. Works with any justify mode. % make this change to main code so lengths can be extracted. Note that % roomleft gets flushed at line end. gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def % calloutwidth calculates only the width of the string, returning it % to the top of the stack. For consistency with other callouts, use % 0 0 (string) cw. This INCLUDES all stretching and font changes! /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (B) MENU JUSTIFY 2.20.91 % The cm routine takes a leading string and a trailing string seperated % by a delimiter and places a row of CONSTANT WIDTH, PRECISELY SPACED, % VERTICALLY ALIGNED and WHOLE dots (or whatever) between the two. It % is based on putting down the dots first and ERASING only whole dots % that are not wanted. /menudots (. ) def /menufont {font5} def /mdoteht 3 def /menudelim ( ) def /cropleadingspaces true def % drawmdots draws a line of menu dots, using plain old show /drawmdots { gsave menufont xxm yym moveto txtwide menudots stringwidth pop dup /mdot1 exch def div floor cvi {menudots show} repeat grestore } def % spchomp takes a string and conditionally removes all leading spaces, % returning the truncated string /spchomp {cropleadingspaces {dup 0 exch {32 eq {1 add}{exit} ifelse } forall} if exch dup length 2 index sub 3 -1 roll exch getinterval} def % mlineproc takes the mline string and processes it into a leading string, % the dot row, and a trailing string. Unused dots are erased with logic % to insure whole dots only. Null strings are ignored. /mlineproc {mline length 0 gt {drawmdots mline menudelim search {/lmstr exch def pop spchomp /rmstr exch def } if gsave showadgrays {0.96}{1}ifelse setgray % for web color xxm yym moveto mdoteht setlinewidth 0 0 lmstr cw mdot1 div ceiling mdot1 mul 0 rlineto stroke xxm txtwide mdot1 div floor mdot1 mul add yym moveto 0 0 rmstr cw mdot1 div ceiling mdot1 mul neg 0 rlineto stroke grestore xxm yym lmstr cl xxm txtwide add yym rmstr cr /yym yym yinc sub def} if} def % mj menujustify accepts tabbed string pairs and converts them into % dotted menu listings.. /cm {gsave /msg exch def /yym exch def /xxm exch def { msg (\n) search {/mline exch def pop /msg exch def mlineproc} {/mline exch def mlineproc exit } ifelse} loop grestore} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % /txtwide 170 def % textwidth /txtwide txtwide 8 sub def /yinc 8 def xpos 4 add ypos 0 sub (Ask the Guru I or II or III $24.50 Hardware Hacker II, III or IV $24.50 Tech Musings V or VI $24.50 Micro Cookbook I $19.50 PostScript Beginner Stuff $29.50 PostScript Show and Tell $29.50 Intro to PostScript Video $29.50 PostScript Reference II $34.50 PostScript Tutorial/Cookbook $22.50 PostScript by Example $32.50 Understanding PS Programming $29.50 PostScript: A Visual Approach $22.50 PostScript Program Design $24.50 Thinking in PostScript $22.50 LaserWriter Reference $19.50 Type 1 Font Format $16.50 Acrobat Reference $24.50 Whole works (all PostScript) $380.00 Technical Insider Secrets |9|kFREE|j|j|j|5 ) cm /txtwide txtwide 8 add def xpos ypos (|F |h|c|c|c |b |a |h |C|6BOOK-ON-DEMAND|j|j PUB|j|j KIT |h|F|a |5Ongoing details on Book-on-demand publishing, a new method of producing books only when and as ordered. Reprints, sources, samples. |8$39.50|5 |b |a |h |C|6THE|j|j C|kASE|j|j A|kGAINST|j|j P|kA|kTENTS |h|F|a |5For most individuals, patents are virtually certain to result in a net loss of sanity, energy, time, and money. \ This reprint set shows you Don's tested and proven real-world alternatives. |828.50|5 |b |a |h |C|6BLATANT|j|j OPPORTUNIST|j|j I |h|F|a |5The reprints from all Don's Midnight Engineering columns. Includes a broad range of real world, proven coverage on small scale technical startup ventures. Stuff you can use right now. \ |8$24.50|5 |b |a |h |C|6RESOURCE|j|j BIN|j|j I |h|F|a |5A complete collection of all Don's Nuts & Volts columns to date, including a new index and his master names and numbers list. |8$24.50|5 |b |a |h |C|6FREE|j|j SAMPLES |h|F|a |5Check Don's Guru's Lair at |-http://www.tinaja.com|5 for interactive catalogs and online samples \ of Don's unique products. Searchable reprints and reference resouces, too. Tech help, hot links to cool sites, consultants. |jemail:|j|- don@tinaja.com|1 ) stringgonzo showreaderservicenumber { /sstretch 0.25 def /cstretch 0.20 def /font1 /Helvetica-Bold [6 0 0 8 0 0 ] gonzofont bc 0 sub botheight neg 10 sub 2 sub %(Write in ) readerservicenumber ( ) cvs mergestr %( on Reader Service Card.) mergestr cc (FREE catalog: http://www.tinaja.com) cc } if adsave restore } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /figure5xx { % name of textfile: muse.fig.106.5 induction heating schematic % ............................ % figure or text starts here ////////////////////////////////////// save /snap1 exch def %%%%%%%%%%%%%%%%%%% electronics begin end ypos snap1 restore /ypos exch def } def %%%%% MUSE PATCHES %%%%% % Version 8.0 Jan 11, 1997 % Insert just before "Name of textfile" on "Z" page. muse3 begin %%%%%%%%%%%%%%%% New colorizer patches %%%%%%%%%%%%%%%%%% /boxgrays 0.92 def /grayshade boxgrays def /mastergray boxgrays def /staytint {0.33 setgray} def /staytint1 {0.25 setgray} def /showadgrays true def /Zmacro {staytint /ypos ypos 2 add def 72 300 div setlinewidth xpos ypos moveto txtwide 0 rlineto stroke /ypos ypos -2 add def tintoff} def % hair rule /amacro {(zy0) stringmacro /ypos ypos ypara add def 0.33 setgray } def % start drop cap /bmacro {(iFy1) stringmacro /ypos ypos ypara add def black} def % finish drop cap % Gonzo character colorizer /blueon {mark /blue cvx 0.33 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /blueoff {mark /beige cvx 0 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tinton {mark 0.33 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tinton1 {mark 0.25 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def /tintoff {mark 0 /setgray cvx] cvx printlist exch 3 index exch put exch 1 add exch} def %%%%%%%%%%%%%% COMPACT VERSION OF COLORIZER II %%%%%%%%%%%%%%%%%%%%%% /settint {dup /currenttint exch store 5.999 mul dup floor cvi /&cbar exch store dup floor sub /&cwt exch store [ {/setgray [ /dup cvx 0.3 &cwt 0.59 mul add /ge cvx [1 /exch cvx &cwt 0.59 mul 0.30 add /sub cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx ] cvx [ &cwt 0.59 mul 0.3 add /div cvx /dup cvx &cwt /mul cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub 0.3 mul add /ge cvx [1 &cwt sub 0.3 mul 0.59 add /sub cvx &cwt 0.3 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx /exch cvx 1 /exch cvx] cvx [1 &cwt sub 0.3 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx 0] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 &cwt 0.11 mul add /ge cvx [&cwt 0.11 mul 0.59 add /sub cvx 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx 1 /exch cvx] cvx [0 /exch cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.59 1 &cwt sub mul 0.11 add /ge cvx [1 &cwt sub 0.59 mul 0.11 add /sub cvx &cwt 0.59 mul 0.30 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx 1] cvx [0 /exch cvx 1 &cwt sub 0.59 mul 0.11 add /div cvx /dup cvx 1 &cwt sub /mul cvx /exch cvx] cvx /ifelse cvx /setrgbcolor cvx] cvx /def cvx} {/setgray [/dup cvx 0.11 &cwt 0.30 mul add /ge cvx[&cwt 0.30 mul 0.11 add /sub cvx 1 &cwt sub 0.30 mul 0.59 add /div cvx /dup cvx 1 &cwt sub /mul cvx &cwt /add cvx /exch cvx 1] cvx [ &cwt 0.30 mul 0.11 add /div cvx /dup cvx &cwt /mul cvx /exch cvx 0 /exch cvx ] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} {/setgray [ /dup cvx 0.30 1 &cwt sub 0.11 mul add /ge cvx[ 1 /exch cvx 1 &cwt sub 0.11 mul 0.30 add /sub cvx &cwt 0.11 mul 0.59 add /div cvx /dup cvx &cwt /mul cvx 1 &cwt sub /add cvx ] cvx [ 1 &cwt sub 0.11 mul 0.30 add /div cvx /dup cvx 1 &cwt sub /mul cvx 0 /exch cvx] cvx /ifelse cvx /setrgbcolor cvx ] cvx /def cvx} ] &cbar get exec exec} bind def /beige {0.10 settint} def % examples of convenience operators /aqua {0.52 settint} def /blue {0.67 settint} def /lime {0.44 settint} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% beige %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % //// REVISED PROC ///// electronics begin % dipdraw - draws a dip integrated circuit. (old code to be improved) % Enter with currentpoint set to pin 1 and scale % set so that 1.0 = distance between pins. Then % do a numpins-(name)-(hipins)-(lopins) dipdraw % Pin callouts preceeded by / will be complemented. % main dipdraw entry: /dipdraw { save /dipsnap exch def /hipins exch def /lopins exch def /chipname exch def /numpins exch def mark 0 0 0 0 0 0 0 0 0 0 0 0 % temp patch /howlong {numpins 2 div cvi 1 add} def /howhigh {4 numpins 36 ge {1 add} if} def /stub {howhigh 1.4 sub 2 div} def % internal service subs start here: /pinproc {numpins 2 div cvi{newpath 0 cpos 0.37 0 360 arc gsave 1 setgray fill grestore 0.067 setlinewidth stroke pin# 5 string cvs dup stringwidth pop 2 div neg cpos 0.2 sub moveto show 1 0 translate /pin# pin# dir add def} repeat } def /stretchprint { dup stringwidth pop 2 div neg exch length 1 sub stretch mul 2 div sub 0 moveto callout (/) anchorsearch true eq {currentpoint exch stretch add exch moveto pop dup /callout exch def stringwidth pop callout length 1 sub stretch mul add /barwide exch def 0.033 setlinewidth gsave currentpoint 0.55 add moveto barwide 0 rlineto stroke grestore} if stretch 0 callout ashow pop} def /pincallouts{0 vpos translate {workstring ( ) search true eq {/callout exch def pop /workstring exch def callout stretchprint 1 0 translate}{dup /callout exch def stretchprint exit } ifelse}loop} def % actual dipdraw process starts here: % ........ the outline: gsave 1 setlinecap 1 setlinejoin currentpoint translate newpath -1 howhigh 2 div 0.7 -90 90 arc 0 stub rlineto howlong 0 rlineto 0 howhigh neg rlineto howlong neg 0 rlineto closepath gsave grayshade setgray fill grestore 0.33 setgray 0.36 setlinewidth stroke newpath -.55 .45 0.15 0 360 arc fill black % ........ pin circles and numbers: /Helvetica-Bold findfont [0.4 0 0 0.55 0 0] makefont setfont gsave /pin# 1 def /dir 1 def /cpos 0 def pinproc grestore gsave /pin# numpins def /dir -1 def /cpos howhigh def pinproc grestore % pin callouts: /Helvetica findfont [0.35 0 0 0.6 0 0] makefont setfont /stretch 0.033 def gsave /workstring hipins def /vpos 0.6 def pincallouts grestore gsave /workstring lopins def /vpos howhigh 1.05 sub def pincallouts grestore % device number: 0.33 setgray /Helvetica-Bold findfont [1.4 0 0 1 0 0] makefont setfont /stretch 0.05 def gsave numpins 2 div 1 sub 2 div howhigh 2 div 0.33 sub translate chipname dup /callout exch def stretchprint grestore black % end cleanup: grestore grestore cleartomark dipsnap restore} def end % get out of electronics? % titleblock, headers and footers /titleblock {save /blurbsnap exch def /colcheck {} def /cstretch 0.2 def sstretch 1 def cml cmt bh1 sub 15 add translate /blurbboxwide 180 def /blurbboxhigh 80 def 1 setlinecap bestgray 3 23 mt hdw 15 sub blurbboxwide sub 3 sub 23 lineto hdw 3 sub 23 moveto -10 0 rlineto [6 0.33 4.5 .85] superstroke hdw blurbboxwide sub 15 sub 0 blurbboxwide blurbboxhigh 5 roundbox gsave grayshade setgray fill grestore % temp expt [4 0.33 2.5 .85] superstroke 0.85 setgray 4.5 setlinewidth -5 23 mt 3 r blurbboxwide 1 add 23 mt 3 r stroke grestore 0.33 setgray /font0 /Palatino-Bold 30 gonzofont /font1 /Palatino-Bold 10 gonzofont /font2 /Palatino-Bold 12 gonzofont font2 4 62 7 add author cl 0.33 setgray font0 3 34 4 add titlename cl font2 4 7 titledate cl 0.20 setgray /yinc 12 def hdw font1 105 sub 60 dokeystone titleblurb cck blurbsnap restore} def /hrule1 {gsave newpath setlinewidth 1 index 4 2 roll moveto lineto stroke grestore} def /leftheader {save /blurbsnap exch def /colcheck {} def cml cmt 16 add translate 0.25 setgray gsave mastergray setgray 0 8 mt 16 setlinewidth hdw r grestore % color fill? 0 0 hdw 1.2 hrule1 0 16 hdw 0.5 hrule1 /cstretch 0.2 def /sstretch 1 def /font2 /Palatino-Bold 11 gonzofont 8 4.5 leftheading cl blurbsnap restore} def /rightheader {save /blurbsnap exch def /colcheck {} def cml cmt 16 add translate 0.25 setgray gsave mastergray setgray 0 8 mt 16 setlinewidth hdw r grestore % color fill? 0 0 hdw 1.2 hrule1 0 16 hdw 0.5 hrule1 /cstretch 0.2 def /sstretch 1 def /font2 /Palatino-Bold 11 gonzofont hdw 8 sub 4.5 rightheading cr blurbsnap restore} def /hrule1 {gsave newpath setlinewidth 1 index 4 2 roll moveto lineto stroke grestore} def /leftfooter { save /blurbsnap exch def /colcheck {} def 0.25 setgray cml cmb 13 sub translate /txtwide 1000 store /font3 /Helvetica 4.5 gonzofont font3 hdw -6 (Copyright c 1998 by Don Lancaster and Synergetics (520) 428-4073 \ www.tinaja.com \ All commercial rights and all electronic media rights fully reserved. \ Reposting is expressly forbidden.) cr 0 0 hdw 0.8 hrule1 gsave 25 0 translate -18 -7 36 14 2 roundbox gsave mastergray setgray fill grestore 0.5 setlinewidth stroke /font2 /Palatino-Bold 11 gonzofont /cstretch 0.4 def 16 2 add 3.5 columnum ( ) cvs (.) mergestr colpagenum ( ) cvs mergestr cc blurbsnap restore /colpagenum colpagenum 1 add def } def % adjusted for 100 - was -16 -7 32 14 /rightfooter {save /blurbsnap exch def /colcheck {} def cml cmb 13 sub translate /txtwide 1000 store /font3 /Helvetica 4.5 gonzofont font3 0.25 setgray 0 -6 (Copyright c 1998 by Don Lancaster and Synergetics (520) 428-4073 www.tinaja.com \ All commercial rights and all electronic media rights fully reserved. \ Reposting is expressly forbidden.) cl 0 0 hdw 0.8 hrule1 gsave hdw 25 sub 0 translate -18 -7 36 14 2 roundbox gsave mastergray setgray fill grestore 0.5 setlinewidth stroke /cstretch 0.4 def /font2 /Palatino-Bold 11 gonzofont 16 2 add 3.5 columnum ( ) cvs (.) mergestr colpagenum ( ) cvs mergestr cc blurbsnap restore /colpagenum colpagenum 1 add def} def /hackhelp { % nt: hack.help % .. /sstretch 0 def /cstretch 0.1 def /font0 /Helvetica-Bold [8.5 0 0 8 0 0] gonzofont /font1 /Helvetica [8.5 0 0 8 0 0] gonzofont /font2 /Helvetica-Bold [8.5 0 0 8 0 0 ] gonzofont /font7 /Helvetica-Oblique [8.5 0 0 8 0 0] gonzofont /yinc 9.5 def /font2 {font1} def 0 grayshade 1 ne {pop 0.25} if setgray bc bt 15 sub (|0NEED HELP?) cc bl 14 add bt 30 sub (|1Phone or write all your US |2Tech Musings|1 questions to: |h Don Lancaster |2Synergetics|1 Box 809-EN Thatcher, AZ, 85552 (520) 428-4073 |h US email:|j |7|/surl don@tinaja.com|1|/maildon Web page:|j|j |7|/surl www.tinaja.com|1|/tinaja ) cl } def /ad1 {cm3 cmb 1colwide f5h false true /ad1name /ad1copy stdmusefig} def % link /ad1name ( ) def /h1h yinc 14 mul def % height of optional help box end % muse3 template %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /showreaderservicenumber false def /showadgrays true def /ad1copy { save /adsave exch store 0 0 translate % adjusts position on page was -127 % IMPORTANT: Comment or remove the next line to get the ad up to EN page size! % Do this **ONLY** if you are extracting the ad for EN layout! % 1.03 1.09 scale green staytint xpos 23 sub ypos 283 sub translate 0.95 0.915 scale %%%% This code puts in the reader service number %%%% /readerservicenumber 146 def /squashad true def squashad {1 0.80 scale} if /height 693 114 add 60 add def % stretched twice /width1 165 def /sidethk 4 def /botheight 54 def /topheight 33 def /outrad 10 def /inrad 5 def /pm 0 def /pmnorm 0 def %%%%%%%%%%%%%% KEYSTONE STUFF %%%%%%%%%%%%%%%%%%%%%%% % this is a repeat of the GONZO13B callout width proc ... gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a subtle correction to the gonzo fill justify that makes % txtwide slightly more precise ... gonzo begin /reallyjustF {swallowandhang roomleft cstretch add numchars 1 sub numspaces spacecharratio mul add dup 0 eq {pop 0.001} if div dup cstretch add /cfix exch def spacecharratio mul sstretch add /sfix exch def /xfix 0 def /yfix 0 def} bind def % unconditional justF end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % KEYSTONE STUFF STARTS HERE gonzo begin % This is the core keystone code routine. It works by taking an average % of the first two and last two string lengths to determine the keystone % slope, increment, and starting width. It then checks the length of % each line and extends the starting width as needed so everything fits. /keyproc {/kadj exch def /msg2 exch def /yy1 exch def /xx1 exch def mark {msg2 (\n) search {exch pop exch /msg2 exch def dup length 0 le {pop} if}{dup length 0 le {pop} if exit} ifelse} loop ] /karray exch def 0 0 karray 0 get cw 0 0 karray 1 get cw add 2 div dup 0 0 karray dup length 1 sub get cw 0 0 karray dup length 2 sub get cw add 2 div sub neg karray length 1 sub div dup /kinc exch def 2 div sub /kstart exch def /txtwide 10000 def 0 0 1 karray length 1 sub {/kpn exch def 0 0 karray kpn get cw kstart kinc kpn mul add sub 2 copy lt {exch} if pop} for kstart add 1.01 mul dup /kstart exch def /txtwide exch def /justifylastline true def 0 1 karray length 1 sub { /posn exch def yy1 xx1 kstart kadj exch posn karray exch get cf /txtwide txtwide kinc add def /xx1 xx1 kinc kadj def /yy1 yy1 yinc sub def} for} def % these are the three keystone routines. Use xpos ypos true (msg strings) % cck, etc. true for keystone; false for ordinary justify. /cck {save /keysnap exch def exch {{2 div sub} keyproc} {cc} ifelse keysnap restore} def % callout centered keystone /clk {save /keysnap exch def exch {{pop} keyproc} {cl} ifelse keysnap restore} def % callout left keystone /crk {save /keysnap exch def exch {{sub} keyproc} {cr} ifelse keysnap restore} def % callout right keystone end % close gonzo dictionary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % outside box 0 0 width1 height 5 roundbox showadgrays {0.3}{0} ifelse setgray % for brown border fill % inside box sidethk botheight width1 sidethk 2 mul sub height topheight sub botheight sub inrad roundbox showadgrays {grayshade setgray}{white} ifelse fill black % shade for web /cstretch 0.7 def /sstretch 1.2 def /font1 /Revue 10 gonzofont /font3 /Revue 9 gonzofont /font4 /Revue [9 0 0 9.05 0 1] gonzofont /font9 /Helvetica-Bold 6.5 gonzofont /font2 /Revue 14 gonzofont font1 % adjust center /bc bc sidethk 2 div add def % top lettering white bc bt 22 add (|1new from) cc bc bt 6 add (|2DON LANCASTER) cc bc -17 (|2SYNERGETICS) cc /yinc 10 def bc -28 (|3B|1ox |3809-EN|1 |1Thatcher, |3AZ 85552 |4(|3520|4)|3 428-4073|1) cc /cstretch 0.1 def /sstretch 0.1 def /font5 /Helvetica-Narrow 8 gonzofont /font6 /Helvetica-Narrow-Bold 10 gonzofont /font7 /Helvetica 6 gonzofont /font8 /Helvetica-Narrow-Bold 8 gonzofont /font: /Helvetica-Bold [5 0 0 4.95 0 6] gonzofont % uneven for distillery /font- /Helvetica-Narrow-Oblique 8 gonzofont black 3 3 (|7FREE US VOICE HELPLINE) cl br 3 sub 3 (|7VISA|j/|jMC) cr /xpos 4 def /txtwide br 8 sub def /yinc 8.5 def /ypos bt 15.5 sub def /amacro {/ypos ypos 2 add def} def /cmacro {/ypos ypos 1 add def} def /kern 0.5 def /bw width1 sidethk 2 mul sub def % obtuse code avoids the arcto bug /bmacro { gsave showadgrays {0.3}{0} ifelse setgray % for brown border -0.45 ypos translate 0 0 mt 5 [-0.5 30 -0.5 3 bw 1 add 3 bw 1 add 30 ] roundpath 0 -31 rlineto bw 1 add neg 0 rlineto closepath fill newpath 0 0 mt 5 [-0.5 -30 -0.5 -3 bw 1 add -3 bw 1 add -30 ] roundpath 0 31 rlineto bw 1 add neg 0 rlineto closepath fill grestore } def /Umacro {ypos} def xpos ypos (|/tinton1 |C|6A|kCTIVE|j|j FILTER|j|j COOKBOOK |h|a |F|5The sixteenth|k (!|j)|k printing of Don's bible on analog op-amp lowpass, bandpass, and highpass active filters. De-mystified instant designs. |8 $28.50|1 |b |a |h |/tinton1 |C|6RESEARCH|j|j INFOPACKS |h|F|a |5Don's instant cash-and-carry flat rate consulting service. Ask any reasonable technical \ question for a detailed analysis and complete report. See |/surl www.tinaja.com|j/|jinfo01|/info01g \ for specifics. \ |8$75.00|5 |b |a |h |C|/tinton1 |6CMOS|j|j AND|j|j TTL|j|j COOKBOOKS |h|a |F|5Millions of copies in print worldwide. |8THE|5 two books for digital integrated circuit fundamentals. About as hands-on as you can get. |8$28.50 |5each.|1 |b |a |h |/tinton1 |C|6INCREDIBLE|j|j SECRET |h|c |/tinton1 MONEY|j|j MACHINE|j|j II |5|h|F|a Updated 2nd edition of Don's classic on setting up your own technical or craft venture. |8$18.50|1 |b |a |h |/tinton1 |C|6LANCASTER|j|j CLASSICS|j|j LIBRARY |5|h|a|F Don's best early stuff at a bargain price. Includes the CMOS Cookbook, The TTL Cookbook, Active Filter Cookbook, PostScript video, Case Against Patents, Incredible Secret Money Machine II, and \ Hardware \ Hacker II reprints. |8$119.50|1 |b |a |h |/tinton1 |C|6L|kOTS|j|j OF|j|j OTHER|j|j GOODIES |5|h|a) stringgonzo %%%%%%%%%%%%%%%%%%%%%%%% % (A) WIDTH CALCULATIONS 2.20.91 % A new curwide variable lets you calculate the gonzo string % width independent of printing it. Handy for menu justify, etc.. % Use has to be bracketed with /oktoprint false def /oktoadvance % false def --- stuff --- and then true. Works with any justify mode. % make this change to main code so lengths can be extracted. Note that % roomleft gets flushed at line end. gonzo begin /endtheline {/curwide txtwide roomleft sub def justx cvx exec oktoprint {printline} if} bind def % calloutwidth calculates only the width of the string, returning it % to the top of the stack. For consistency with other callouts, use % 0 0 (string) cw. This INCLUDES all stretching and font changes! /cw {save /snapc1 exch def /oktoadvance false def /oktoprint false def /linestring linestring2 def /justx (justL) def 3 1 roll /ypos exch def /xpos exch def stringgonzo curwide snapc1 restore} def end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (B) MENU JUSTIFY 2.20.91 % The cm routine takes a leading string and a trailing string seperated % by a delimiter and places a row of CONSTANT WIDTH, PRECISELY SPACED, % VERTICALLY ALIGNED and WHOLE dots (or whatever) between the two. It % is based on putting down the dots first and ERASING only whole dots % that are not wanted. /menudots (. ) def /menufont {font5} def /mdoteht 3 def /menudelim ( ) def /cropleadingspaces true def % drawmdots draws a line of menu dots, using plain old show /drawmdots { gsave menufont xxm yym moveto txtwide menudots stringwidth pop dup /mdot1 exch def div floor cvi {menudots show} repeat grestore } def % spchomp takes a string and conditionally removes all leading spaces, % returning the truncated string /spchomp {cropleadingspaces {dup 0 exch {32 eq {1 add}{exit} ifelse } forall} if exch dup length 2 index sub 3 -1 roll exch getinterval} def % mlineproc takes the mline string and processes it into a leading string, % the dot row, and a trailing string. Unused dots are erased with logic % to insure whole dots only. Null strings are ignored. /mlineproc {mline length 0 gt {drawmdots mline menudelim search {/lmstr exch def pop spchomp /rmstr exch def } if gsave showadgrays {grayshade}{1}ifelse setgray % for web color xxm yym moveto mdoteht setlinewidth 0 0 lmstr cw mdot1 div ceiling mdot1 mul 0 rlineto stroke xxm txtwide mdot1 div floor mdot1 mul add yym moveto 0 0 rmstr cw mdot1 div ceiling mdot1 mul neg 0 rlineto stroke grestore xxm yym lmstr cl xxm txtwide add yym rmstr cr /yym yym yinc sub def} if} def % mj menujustify accepts tabbed string pairs and converts them into % dotted menu listings.. /cm {gsave /msg exch def /yym exch def /xxm exch def { msg (\n) search {/mline exch def pop /msg exch def mlineproc} {/mline exch def mlineproc exit } ifelse} loop grestore} def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % /txtwide 170 def % textwidth /txtwide txtwide 8 sub def /yinc 8 def xpos 4 add ypos 0 sub (Tech Musings V or VI $24.50 Ask the Guru I or II or III $24.50 Hardware Hacker II, III or IV $24.50 Micro Cookbook I $19.50 PostScript Beginner Stuff $29.50 PostScript Show and Tell $29.50 PostScript Video & secrets $29.50 PostScript Reference II $34.50 PostScript Tutorial/Cookbook $22.50 PostScript by Example $32.50 Understanding PS Programming $29.50 PostScript: A Visual Approach $22.50 PostScript Program Design $24.50 Thinking in PostScript $22.50 LaserWriter Reference $19.50 Type 1 Font Format $16.50 Acrobat Reference $24.50 Whole works (all PostScript) $380.00 Technical Insider Secrets |9|kFREE|j|j|j|5 ) cm /txtwide txtwide 8 add def xpos ypos (|F |h|c|c|c |b |a |h |/tinton1 |C|6BOOK-ON-DEMAND|j|j PUB|j|j KIT |h|F|a |5Ongoing details on Book-on-demand publishing, a new method \ of producing books only when and as ordered. Reprints, \ sources, samples. |8$39.50|5 |b |a |h |/tinton1 |C|6THE|j|j C|kASE|j|j A|kGAINST|j|j P|kA|kTENTS |h|F|a |5For most individuals, patents are virtually certain to result in a net loss of sanity, energy, time, and money. \ This reprint set shows you Don's tested and proven real-world alternatives. |828.50|5 |b |a |h |/tinton1 |C|6BLATANT|j|j OPPORTUNIST|j|j I |h|F|a |5The reprints from all Don's Midnight Engineering columns. Includes a broad range of real world, proven coverage on small scale technical startup ventures. Stuff you can use right now. |8$24.50|5 |b |a |h |/tinton1 |C|6RESOURCE|j|j BIN|j|j I |h|F|a |5A complete collection of all Don's Nuts & Volts columns to date, including a new index and his master names and numbers list. |8$24.50|5 |b |a |h |/tinton1 |C|6FREE|j|j SAMPLES |h|F|a |5Check Don's Guru's Lair at |-|/surl http://www.tinaja.com|5|/tinaja for interactive \ catalogs and online samples \ of Don's unique products. Searchable reprints and reference resouces, too. Tech help, hot links to cool sites, consultants. |jemail:|j|- |/surl don@tinaja.com|1|/maildon ) stringgonzo showreaderservicenumber { /sstretch 0.25 def /cstretch 0.20 def /font1 /Helvetica-Bold [6 0 0 8 0 0 ]gonzofont bc 0 sub botheight neg 10 sub 2 sub % (Write in ) readerservicenumber ( ) cvs mergestr % ( on Reader Service Card.) mergestr cc (FREE catalog: http://www.tinaja.com (do NOT provide RS number!!) ) cc } if adsave restore } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%% ADDITIONAL ELECTRONICS PATCHES %%%% electronics begin /npn {gsave newpath exch 0.2 sub exch translate -.1 0 1.2 0 360 arc gsave grayshade 0.15 sub setgray fill grestore line2 stroke -0.2 0 translate line3 -.3 -.7 moveto 1.4 u line1 -.3 0 mt 1.3 l -.2 .4 mt 0.6 0.4 rlineto 1.2 u newpath -.2 -0.4 mt 0.6 -0.4 rlineto 1.2 d newpath 0.4 -0.75 mt -.2 .3 rlineto -.2 -.3 rlineto closepath fill grestore} def /npnl {gsave translate -1 1 scale 0 0 npn grestore} def /pnp {gsave newpath exch 0.2 sub exch translate -.1 0 1.2 0 360 arc gsave grayshade 0.15 sub setgray fill grestore line2 stroke -0.2 0 translate line3 -.3 -.7 moveto 1.4 u line1 -.3 0 mt 1.3 l -.2 .4 mt 0.6 0.4 rlineto 1.2 u newpath -.2 -0.4 mt 0.6 -0.4 rlineto 1.2 d newpath -.2 .4 mt .3 .4 rlineto .1 -.3 rlineto closepath fill grestore} def /pnpl {gsave translate -1 1 scale 0 0 pnp grestore} def /circ3 {gsave currentpoint newpath 0.8 0 360 arc gsave grayshade dup 1 ne {0.15 sub} if pop 1 % try white setgray fill grestore black line1 stroke grestore} def % end % electronics % %%%ZZZZ%%%%%%%%%%%%%% URL PATCHES %%%%%%%%%%%%%%%%%%%%%%%%%%%% % patch definitions... /maildon {(mailto:don@tinaja.com) eurl } def /tinaja {(http://www.tinaja.com) eurl } def /consult {(http://www.tinaja.com/consul01.html) eurl} def /netscape {(http://www.netscape.com) eurl } def /adobe {(http://www.adobe.com) eurl } def /parallax {(http://www.parallaxinc.com) eurl } def /coriolis {(http://www.coriolis.com) eurl } def /hottalk {(mailto:hottalk@printer-net) eurl } def /hack73 {(http://www.tinaja.com/glib/hack73.pdf) eurl} def /hacklib {(http://www.tinaja.com/hack01.html) eurl} def /magic {(http://www.tinaja.com/magsin01.html) eurl} def /fourier {(http://www.tinaja.com/psutils/fourier.ps) eurl} def /zeroharm {(http://www.tinaja.com/psutils/zeroharm.ps) eurl} def /sincat210 {(http://www.tinaja.com/sn210cat.ps) eurl} def % power method... /setglib {mark (http://www.tinaja.com/glib/) 2 index 20 string cvs mergestr (.pdf) mergestr /eurl cvx ] cvx def} def /sethtml {mark (http://www.tinaja.com/) 2 index 20 string cvs mergestr (.html) mergestr /eurl cvx ] cvx def} def /setweb {mark (http://www.) 2 index 20 string cvs mergestr (.com) mergestr /eurl cvx ] cvx def} def /magicsin {/msinprop} def /parallax {/parallaxinc} def [ /when2pat /msinprop /magicsin /nuts08 /gramtram /muse112 /hack64 /hack86 /ratholes /hack64 /postflut /emergop4 /resbn67 /resbn68 /elesimp /dontsick /muse115 /bannyear /trimode /bustpat /resbn66 ] {setglib} forall [ /magsn01 /tinaja /patnt01 /ismm01 /ismm01 /libry01 /blat01 /advt01 /bod01 /scweb01 /tinaja01 /synlib01 /syncat01 /info01 /picup01 /webwb01 /hack01 /weblib01 /pseudo01 /info01 /beewb01 ] {sethtml} forall [ /parallaxinc /lindsay /bh /amazon /hotbot /discoverypark /keelynet /homepower /epri /rmi /mgfx /newtek /digital.altavista ] {setweb} forall /papers {(http://cfarx1.harvard.edu/rx_lab) eurl} def /mmt {(http://maisel.as.arizona.edu:8080) eurl} def /nrao {(http://info.aoc.nrao.edu) eurl} def /eskimo {(http://www.eskimo.com/~billb) eurl} def /lindsay {(http://www.keynet.net/~lindsay) eurl } def /adams {(http://www.adams1.com/pub/russadam) eurl} def /aha {(http://www.ahasoft.com/complink.htm) eurl} def /wavelet {(http://www.waveloe.org/wavelet/links.html) eurl} def /fm {(http://wmbr.mit.edu/stations/locate.html) eurl} def /billb {(http://www.eskimo.com/~billb) eurl} def /info01g {(http://www.tinaja.com/info01.html) eurlg} def %%%%%% % This code locks pdfmark commands out of a PostScript printer. /pdfmark where {pop}{userdict /pdfmark /cleartomark load put} ifelse % /surl "start url" marks the beginning of a text sequence to be urled. % It also paints the text blue... /surl {mark /blue cvx 0.33 /setgray cvx % change text to blue /currentpoint cvx % remember box start /urly /exch cvx /store cvx /urlx /exch cvx /store cvx ] cvx % complete deferred command printlist exch 3 index exch put % stuff into gonzo printlist exch 1 add exch % increment gonzo list count } def % /eurl "end url" unmarks the end of a text sequence and sets up % the pdfmark needed to define the Acrobat web link. /eurl {mark % start deferred proc exch % position url string /beige cvx 0 /setgray cvx % turn blue marker off /makeurl cvx % defer call of url builder ] cvx % complete deferred proc printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } def /eurlg {mark % special green for ad % start deferred proc exch % position url string /green cvx 0 /setgray cvx % turn blue marker off /makeurl cvx % defer call of url builder ] cvx % complete deferred proc printlist exch 3 index exch % stuff into gonzo printlist put exch 1 add exch % increment gonzo list count } def % /makeurl generates the pdfmark, receiving a {(urlstring) makeurl}. % Note that it is not called until formatted printlist time... /urlover 0.2 def % fraction of hot area over bounds /makeurl { /cururlname exch store % save the url string mark % start pdfmark currentfont /ScaleMatrix get 3 get /fsize exch store % guess height /Rect [ urlx fsize urlover mul sub % set box left x urly fsize urlover mul sub % set box left y currentpoint exch fsize urlover mul add exch fsize add ] /Border [ 0 0 0] % [0 0 0 ] = none; [0 0 2] = debug /Color [ .7 0 0 ] /Action <> /Subtype /Link /ANN % annotation type pdfmark % call pdf operators } def %%%%%%% END MUSE PATCHES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% muse3 starttemplate /sstretch -0 def % try even looser /kern 0.5 def /dropindent 42 def % adjust for width of drop cap /sstretch 0 def % looser still /font0 /Times-Bold [52 0 0 54.1 0 -32] gonzofont % normal % /font0 /Times-Bold [49 0 0 54.1 0 -32] gonzofont % normal /font: /Times-Roman [9.5 0 0 -9.5 0 4.5 ] gonzofont /font9 /Times-Roman [6.8 0 0 7.0 0 -3] gonzofont % squared subscript /font= /Times-BoldItalic [9 0 0 9 0 0 ] gonzofont % subtitles /kern 0.5 def % Command Summary: % |0 - small caps font |1 - normal text font |2 - italic text font % |3 - bold text font |4 - caps text font |6 - header font % |F - fill justify |L - left justify |z - zero indent % |p - normal indent |y - negative linefeed |8 - header font % |g - start gonzo |x - stop gonzo |a - start drop cap % |b - main body text |c - start sub header |d - end sub header % |o - complement char /sstretch 0 def /font9 /Times-Roman [7 0 0 7.1 0 5] gonzofont % factor superscript /kern 0.5 def /font; /Times-Roman [6 0 0 6.01 0 3] gonzofont % square root symbol and gonzo box autoposition linker /topstrlist {mark 3 1 roll {/roomleft exch roomleft exch sub def printlist exch 3 index exch put exch 1 add exch} /exec cvx ] cvx def} def /boxit{ gsave line1 currentpoint translate -1 -3 mt 10.5 pu 50.5 pr 10.5 pd closepath line1 stroke grestore} 0 topstrlist /sqrtsymbol {gsave currentpoint translate line1 3 3 moveto 2 -5 rlineto 4 12 rlineto 32 0 rlineto stroke grestore} 0 topstrlist % TEXT STARTS HERE startgonzo |a O |b nce again, we do seem to have a fascinating mixture \ of pseudoscience and real \ science topics this month. Only this time, \ "they" almost (but not quite) did get the pseudoscience \ part right. Let's start off \ with\274 |c The PIC Calibar |d Tim Jenison of |/surl |2NewTek|1|/newtek just sent me one of his new \ |2Calibar|1 television test generators. This |4$349|1 \ pen-sized instrument shown in figure one can replace an \ entire studio full of pro |4NTSC|1 (never the \ same color) tv test gear. This generates the twenty-four \ precision test patterns shown. Either in the field from \ a two hour internal battery or on the bench from a small \ wall wart ac supply. The Calibar also can double as a station master \ sync generator. The ergonomics here provide new meaning to my search for \ |2elegant simplicity|1. The user interface consists of a \ pushbutton! You briefly hit the button twice for turnon. If \ you don't like the current pattern, keep hitting your \ button until the one you want comes around. Hold the \ button down to turn power off. A single red |4LED|1 \ lights if the Calibar is active. Internal ten bit digital accuracy is used for \ highest waveform precision. Baseband video gets output from \ a male |4BNC|1 connector. Their included adaptors get you into \ phono plugs, phono jacks, or female |4BNC|1. There's \ also a "magic" set of blue glasses you wear for chroma \ balance. Let us review some |4NTSC|1 tv. The crucial \ frequency is called a |2Chroma Reference|1 and is \ always a precise |43.579545|1 Megahertz. As figure two \ shows us, that zero degree or |2burst reference phase|1 \ corresponds to a color very slightly on \ the purple side of blue. As you shift the phase of your \ current signal with respect to this reference, the \ "color wheel" or "vectorscope display" is generated \ nearly as shown. Thus, the phase of your |43.58|1 color \ subcarrier sets the color, while its amplitude sets the \ saturation for you. Actually, a |2color difference|1 amplitude \ scheme is used so that very little subcarrier is needed \ with whites or pastels. Chroma shift adjustments are also made to \ favor facial and skin tones. The chroma reference gets divided by |4227.5|1 to \ produce a |2horizontal scan frequency|1 of |415,735|1 \ Hertz. Providing |463.55|1 microseconds for each \ H scan line. Their further division by |4262.5|1 \ produces a |2vertical field frequency|1 of |459.94|1 \ Hertz. Two fields are combined into a single interlaced \ scan, giving you a frame rate of a tad under thirty \ frames per second. Back to our horizontal scan line. The line is separated \ into a live scan time of around |455|1 microseconds and \ the blanking time of slightly over |48|1 microseconds. \ Blanking gives your classic |4CRT|1 "picture tube" \ electron beam enough time to reset from right screen back to \ left. Baseband video is normally set so that one volt is \ white, a tad over a quarter volt is black, and zero volts \ are "blacker than black" |2sync tips|1. H blanking interval includes a five microsecond wide \ |2horizontal sync pulse|1 and an eight cycle long |2chroma \ reference burst|1 on its "back porch". These are used to \ |2synchronize|1 or lock transmitter to receiver. Their vertical blanking interval is more complex. The vertical \ blanking is needed to give your electron beam time to get back to the \ top of the screen. Various "hidden" services are also \ provided in here, including close captioning, test \ signals, and timing standards. The vertical blanking also \ provides a |2vertical sync pulse|1 as the third locking signal. Some fancy \ |2equalizing|1 "teeth" are placed in the vertical sync \ pulse to preserve horizontal sync extraction and to \ take care of the half line offset between even \ and odd fields. |c Inner Details |d Figure three shows you a rough block diagram of Tim's \ Calibar. The |4PIC 16C57|1 microprocessor used is not \ quite fast enough to directly generate the highest speed video \ timing. But it does |2all|1 of the slower \ tasks. Such as a |2partial|1 pattern timing, \ horizontal scan line generation, pattern picking, pushbutton housekeeping, \ sync, and the frame rate timing. \ The usual |44X|1 chroma frequency of |414.318|1 MHz is \ used as a master system clock. The heart of the circuit is a high speed, low power, ten \ bit |2Harris|1 |4D/A|1 converter, followed by a fast \ video op amp driver of carefully controlled bandwidth. \ The |4D/A|1 is driven from a large |4EPROM|1 pattern \ generator. Low address bits of this pattern generator \ do get continuously and sequentially accessed when you scan \ across each horizontal line. Upper address \ bits pick the pattern for the particular lines being \ output. A resettable 4-bit |4CMOS|1 binary counter does the fastest \ of the pattern addressing. The |4PIC|1 does everything else! \ Their |4PIC|1 apparently executes one instruction cycle \ every chroma cycle of |43.58|1 MHz. My best guess as to how the "half \ cycle" at the end of each H line gets done is by using \ H line pattern |2pairs|1. Again guessing, I suspect that the need for any half or odd H lines \ is eliminated by generating a full two frames of four fields. \ Special line pair sync patterns would be needed for each case of \ even or odd field and even or odd frame. Clearly, there is \ some innovative programming going on here. There's |4910|1 samples of |44X|1 chroma per line, so \ ten address bits |42^10 = 1024)|1 should handle your \ sequential addressing for one H line. Or eleven address bits for \ H line pairs. With a |464K|1 word \ |4EEPROM|1, this leaves you with five address lines to access \ up to |432|1 possible line patterns. Many of these will be needed for \ the exotic synchronization. Some others can be reused in several modes. The nice thing about this scheme is its |2content \ independence|1. You don't have to try and logically \ define all of the patterns; all you do is stash their \ values in a lookup table. Not all that many live patterns should be \ required because any selected screen display mode does not change \ much in the vertical direction. And certain screen modes are simply \ combinations of earlier ones. All patterns are |2exact|1. As precise as |410-|1bit samples allow. I was sort of joking to Tim that he should also offer \ the classic "indian head" pattern. Done as lookup, this \ would require a somewhat oversize |4EPROM|1. With some \ folding, around eight megs might do it. Do note that the Calibar is |4NTSC|1 |2only|1. It is \ |2not|1 intended for |4VGA|1 or other computer monitor \ uses. Owing to differences in scan rates and how colors \ are generated and distributed. But I'd guess that similar \ computer monitor testers are in the works. As an aside, NewTek is not in Kansas anymore. Took the \ dog, but left Aunt Em. Note their new Texas address. Their \ website does remain as |/surl |2www.newtek.com|1|/newtek . More on elegant simplicity in my |/surl |4ELESIMP.PDF|1|/elesimp . I will try \ to work up some |4PIC|1 video demos in a future column. \ Meanwhile, much more on |4PIC|1 apps appears on the \ |/surl |5PIC|2 Library|/picup01 |/surl Shelf|1|/picup01 and the pair of |4PIC Web \ Link|1 pages on |/surl |2www.tinaja.com|1|/tinaja . Good sources for video in general are that older \ |2Television Engineering Handbook|1 from |2McGraw \ Hill|1. And that newer |2Video Demystified|1 from \ |2Harris Semiconductor|1. More tv and video info appears as this \ month's resource sidebar. |c Meta Studies |d How can you honestly evaluate a controversial technical \ concept? One older scientific tool that's seeing new \ life is called the |2Meta Study|1. Where you simply \ "study the studies." You |2objectively|1 and |2without \ bias|1 gather together |2everything|1 you can find on \ the subject. Both pro and con. Only |2after|1 everything is gathered do you try to judge \ both sides for relevance, scientific rigor, timeliness, \ hidden agendas, vested interests, and overall \ credibility. From there, you go on to decide whether you want to spend the \ time and effort to further involve yourself. The \ argument "But you haven't done the experiment" cuts no \ ice here. The chances are "the experiment" (or its \ interpretation) will be dead wrong anyhow. A meta study \ usually will clearly tell you whether there is any point \ in geting further involved. It all comes on down to a simple matter of \ probabilities. A meta study is similar to a civil jury trial, where \ "preponderance of evidence" is carefully sought. Along with \ the suitable "motive, means, and opportunity|k." After you have run a \ few meta studies, obvious "looks like a duck - quacks \ like a duck" patterns emerge. The big picture patterns that \ easily let you separate science from pseudoscience. Or the scams, all of the "not even wrong" bad labwork, and the \ thuzzy finking from real opportunities and \ genuine breakthroughs. The web sure makes doing meta study searches simple and \ easy. I've got lots of brand new search tools at \ |/surl |2www.tinaja.com/webwb01.html|1|/webwb01 But my favorite search \ tool remains good old |2Hotbot|1. Meta studies work in nearly any field. As one practice \ non-electronic ferinstance, punch |2L-Carnitine|1 into \ |2Medline|1 and you'll probably reach the same \ conclusions that I did. That this nutritional supplement \ |2does|1 seem highly useful and effective for certain \ cardiovascular problems but |2does not|1 normally \ provide stamina or energy benefits for fitness \ jocks. More on this in |/surl |4DONTSICK.PDF|1|/dontsick . Free Medline links are found on \ |/surl www.tinaja.com/beewb01.html|1|/beewb01 A custom meta study service is at \ |/surl |2www.tinaja.com/info01.html|1|/info01 |c It's a Gas |d I decided to apply a meta study to |2Brown's Gas|1, one \ currently popular web pseudoscience topic. I found a \ fascinating mixture of legit science, highly unexpected though \ apparently valid "gee whiz" results, along with outrageously \ unsupported claims. The bottom line is that I spotted nothing here to get \ personally excited about. Although a PostScript and \ |4PIC|1 controlled flutterwumping precision torch just might \ make for a rather interesting project. Firstoff, note that any decent torch person can pull off \ all sorts of magic tricks. At Thatcher Fire \ Department, we have a |2Broco|1 oxy-iron torch we use as \ the "master key" to vaporize anything between where we are \ and where we want to go. I've personally used a Broco to \ cut through cement blocks and to burn the bottom out of \ a bucket full of water. From the inside. Let's start with the remixed gas a chemist would get \ from the classic electrolysis of water. This will be a |2stoichiometric|1 \ mixture of very nearly two parts of hydrogen and one \ part of oxygen by volume. For semantics, let's call this \ one |2stokegas|1. On the off chance that Brown's Gas \ might really be something else. Stokegas is one of the most highly combustible \ substances known to man. For this reason, stokegas gets \ normally generated and used |2only|1 as it is needed. \ Storage is a big time no-no. Specialized torches seem to \ be a good on-demand match here. Stokegas burns with an extremely hot but remarkably low \ energy flame. The degrees are there but the |4BTU|1's \ are not. Ferinstance, gasoline offers |49000|1 watt \ hours of energy per liter. Stokegas at normal temperature and \ pressure delivers only |42.4|1 watt hours per liter. Stokegas theoretically burns at |45120|1 degrees F or \ |43100|1 degrees C. Hydrogen in air theoretically burns \ at |43860|1 degrees F or |42400|1 degrees C. By \ contrast, acetylene in air burns at a |2hotter|1 \ |44770|1 F or |42670|1 C. Claims that you can |2briefly|1 place your hand |2near|1 a \ stokegas flame do appear true. But do |2not|1 try it! The reason \ is that despite the extreme temperature, there is not \ enough heat energy present to briefly do you any significant \ harm. A claim that stokegas "adjusts" its \ temperature to suit the task at hand is apparently rotten \ labwork. Infrared thermometers are based on emissivity \ and there is darn little to emiss. The correct method to \ make an accurate reading is to place an object in the \ flame and heat it. Then measure the object's emitted radiation. Even then, interpretation can get \ rather tricky. Is a hydrogen flame invisible? Haz mat folks \ think so. Especially during that hot summer afternoon \ tanker rollover in the Phoenix desert. Where they had to \ "joust" with a rag on a pike pole to find the flame \ front. In the lab, you can in fact see the flame. Albeit \ it a rather weak one. Reasons for the near invisibility \ include an emission primarily in the ultraviolet, the lack \ of carbon particles, and the low total energy \ involved. Valid hydrogen proponents are taking steps to make their \ flames more visible. Similar to placing that \ |2methyl mercapan|1 odorant in natural gas. Which \ otherwise has no smell whatsoever. It seems that whenever they \ first tried natural gas odorants, they used a chemical \ that smelled |2good|1, rather than bad. Which made \ people purposely leave their gas jets open to act as \ room air fresheners! Does stokegas implode rather than explode? Not really. \ However, |2if|1 the container walls are cool enough, the \ generated steam |2will|1 condense and |2will|1 provide you \ with an amazingly reduced final pressure. Perhaps down \ around |41 PSI|1 or so. Giving you an explosion rapidly \ followed by condensation. There are two rather distinct but \ overlapping processes here. After demonstrating this \ effect several times in a row, the container walls and the \ accumulated water usually seem to heat up enough that \ positive pressures result. The claims that an "implosion" can lead to any "subvacuum" pressures \ or pressures below the vapor pressure of liquid \ water have no apparent basis in fact. Tain't likely McGee. Could a reduced pressure engine be developed? Possibly. \ Would it be useful or efficient? Almost \ certainly not. Why? Because of inherent and fundamental \ thermodynamic cycle limitations. More on all these thermodynamic cycles in |/surl |4HACK64.PDF|1|/hack64 . Certain Brown's gas proponents claim they are generating \ something that's different than stokegas. Yet the schematics I \ looked at seemed to be sending more or less plain old \ current through more or less plain old water. Brown's gas proponents claim to |2melt|1 tungsten. This \ is believed to be impossible with stokegas. However; reversible \ tungsten side reactions that can involve oxidation, ablation, \ or a sublimination appear to be credible mainstream \ explanations for all of the observed effects. Proponents also claim significant generation and long term \ storage of |2monoatomic|1 oxygen and hydrogen. Which I \ find highly unlikely, and a chemist finds so hilarious \ they won't even talk about it. As far as anyone knows, \ monoatomic hydrogen and oxygen very rapidly \ recombine into their diatomic forms or quickly enter into \ other reactions at most realistic temperatures and \ pressures. Certain Brown's gas proponents also claim overunity \ generation and the ability to neutralize radioactivity. \ The strongest evidence for these last three \ extraordinary claims so far is a |4GIF|1 image \ of a large orange box. Which clearly is radiating at \ |4590|1 nanometers. Uh, nice try. As to doing overunity hydrogen generation, it |2does|1 turn \ out that up to |2one sixth|1 of electrolysis energy \ can |2sometimes|1 in fact come from waste heat rather \ than input electricity. But this modest "gain" happens \ only at low production rates and is usually swamped by \ other cell losses. There is also classic |4EE|1 student lab blunder \ |4#01-A|1. Where you'll fail to accurately measure rms \ power when dealing with any unusual waveforms. More on this \ in |/surl |4MUSE112.PDF|1|/muse112 . Claims that any electrolysis cell "stays cool" are easily \ explained by staying in the endothermic generation \ region between |41.23|1 and |41.47|1 volts. More details in Peavey's ineptly misnamed |2Fuel From \ Water|1, stocked by |/surl |2Lindsay Publications|1|/lindsay . I've found nothing whatsoever to convince me that Brown's \ gas is in any way, shape, or form any different from \ stokegas. But the simple mass spectrographic proof \ has apparently has never gotten done. Other web proponents claim to be able to somehow "resonate" a \ water molecule, aiding its dissociation. In some vaguely \ overunity manner. The problem is that the frequencies \ they are using seem |2ten million|1 times too low. And \ even if resonance worked, I personally see absolutely |2no way|1 \ that any energy gain could possibly result in the \ process. Claims that a hydrogen powered car can be run with "a few \ watts of electricity" are usually demonstrated by \ running the few watts for a long time, dangerously \ accumulating the gas, and then idling the car for a brief \ instant. Otherwise known as using a |2piggy bank|1 effect. Unless such extraordinary claims can be solidly backed \ up by lots of independent tests and extraordinary \ evidence, \ these on-board "miracle" hydrogen electrolysis generators will remain \ totally useless for cars. Why? Because you'd be ridiculously \ better off sending the electricity directly to \ wheel motors in the first place. Lots more about Brown's Gas is on the net. Be sure to \ remember that |2net|1 clearly stands for |2Not Entirely \ True|1. There is no Brown's Gas torch or information \ supplier that I can honestly recommend. First because of \ highly questionable claims and endemic bad labwork. And \ second, because I strongly feel the |2Broco|1 is a \ vastly better choice for any hazmat, rescue, underwater, or \ maintenance. More on hydrogen can be found \ in |/surl |2http://www.glib/muse115.pdf|/muse115 |c An Energy Density Summary |d It never ceases to amaze me how figures that people do \ not want you to see sometimes are extremely hard to pin \ down. Such as a simple and direct comparison of energy \ density. Or the fact that the currently highly touted \ electric car has a theoretical |2maximum|1 energy \ storage equivalent to |2less|1 than |2six pints|1 of \ gasoline. Less than your lawn mower. As a review, a |2fuel|1 is something (such as gasoline) \ that is capable of delivering net |4BTU|1's worth of "on the \ books" energy. The fact that the sun and some swamp \ labored eons to preconcentrate the energy does not seem \ to count. What does count by today's economics is just how \ much energy you get back for the energy and "energy \ equivalents" you put in. |2Using today's dollars|1. By contrast, any |2energy transport means|1 (such as \ hydrogen or lead acid) does |2not|1 deliver any net "on \ the books" |4BTU|1's or watt hours. These are simply \ ways of |2moving|1 already existing energy to a more \ convenient time or place. But |2always|1 done at an \ efficiency and energy |2loss|1. At any rate, two very important measures of "how good" either \ a fuel or an energy transport means are: How heavy is it? \ How much room does it take up? A useful measure of \ "how heavy" is in |2watt hours per kilogram|1. The "how \ much room" can be in |2watt hours per liter|1. Figure four gives you the direct comparisons for \ conventional and alternate energy densities. Form \ your own conclusions. |c New Tech Lit |d What just might be |2the|1 long sought inside secret to \ photosynthesis |2may|1 have appeared in |2Science|1 for \ Sept |426, 1997|1. Check out "A Metalloradical Mechanism for the \ Generation of Oxygen from Water in Photosynth- esis|1. By Hoganson \ and Babcock. On \ pages |41953-1956|1. Their key process may involve a manganese compound which \ goes through five reaction states. The first state \ accepts water and solar energy and kicks off both an electron \ and a hydrogen ion. States two, three, and four also \ kick off an electron and a hydrogen ion. State five \ burps out a new diatomic oxygen molecule as a "waste product", \ and reverts itself back to state one. Fron |2SenSym|1 an update on their fine |2Solid State \ Pressure Sensors Handbook|1. |2Dallas \ Semiconductor|1 has their latest |2Short Form Catalog|1 on \ clock, temperature, digital pot, and other unique \ chips. Our two featured trade journals this month: |2Biocard \ International|1 on hand print and related security, and \ |2Weighing Technology|1 on scales. The |2Secrets of Building a Plastic Injection Molding \ Machine|1 forms the latest title from |2Lindsay \ Publications|1. It shows you how to recycle ordinary \ plastics into custom items. Vince and \ Dave Gingery are the authors. |4$15.95|1. Website: |/surl |2www.keynet.net/~lindsay|1|/lindsay One Internet marketing book I am rather impressed with \ is |2Increasing Hits and Selling More from your Web \ Site|1. Authored by Greg Helmstetter and published by \ |2Wiley|1. |/surl |2Amazon Books|1|/amazon sells it at |4$19.96|1. While \ largely nontechnical, it seems to nicely complement some \ of the ideas and concepts you'll find in the |/surl |2Webmaster \ Library Shelf|1|/weblib01 files of my |/surl |2www.tinaja.com|1|/tinaja . Free and detailed specs on new |2PostScript Level |5III|1 \ are now available from |/surl |2www.adobe.com|1|/adobe . Level |4III|1 \ is more about "formalizing" high end publishing and \ networking options, rather than about adding new low \ level features. Although there is a unique curvetracing \ feature (spline interpolation of sampled data), that \ I will be looking at closely. Sadly, the transparency \ options you'll need for video apps do still seem to be either lacking \ or well hidden. Brand new opportunities in |4PIC|1 \ PostScript robotics can be found in my |/surl |4POSTFLUT.PDF|1|/postflut My ongoing |2Blatant Opportunist|1 columns are now \ in ezine format at \ |/surl |2www/tinaja.com/blat01.html|1|/blat01 The latest two include \ |/surl |4BANNYEAR.PDF|1|/bannyear on profiting from internet \ advertising banners; and |/surl |4TRIMODE.PDF|1|/trimode about tri-mode \ paper, electrons, and plastic publishing options. For details on starting up your own tech venture, do take a gander at \ my |/surl |2Incredible Secret Money Machine II|1|/ismm01 . Per my \ nearby |/surl |2Synergetics|1|/synlib01 ad. Or on my |2Guru's Lair|1 \ website you'll find at |/surl |2www.tinaja.com/ismm01.html|1|/ismm01 As usual, most of the mentioned items should appear in \ the |2Names & Numbers|1 or the |2Television Resources|1 sidebars. Always \ check here before you phone our |4US|1 technical \ helpline shown \ in that |2Need Help?|1 \ box you'll find nearby. Let's hear from you.|/tinton |-F|1 |x showpage % this optionally displays the figures /prodart false def prodart { /fig1x {40 50 2colwide f1h true true /f1name /figure1 stdmusefig} def % link /fig2x {40 50 2colwide f2h true true /f2name /figure2 stdmusefig} def % link /fig3x {0 50 2colwide f3h true true /f3name /figure3 stdmusefig} def % link /fig4x {40 20 2colwide f4h true true /f4name /figure4 stdmusefig} def % link /helpx {50 200 1colwide h1h true false /helpname /hackhelp graymusefig} def /ad1 {100 100 1colwide f5h false true /ad1name /ad1copy stdmusefig} def % link /grayshade 0.92 def 1.5 dup scale {0 0 0.9 fig1x} exec showpage /narrowfig 50 def 1.5 dup scale {0 0 0.9 fig2x} exec showpage /narrowfig 0 def 60 0 translate % huh? 1.5 dup scale {0 0 0.9 fig3x} exec showpage /narrowfig 50 def 1.5 dup scale { 0 0 0.9 fig4x} exec showpage /narrowfig 0 def /surl{}def /maildon{} def /tinaja {} def -100 150 translate 1.5 dup scale {0 -6 1 help} exec showpage /urlx 50 def % temp? /urly 50 def /grayshade 1 def 1.5 dup scale {0 0 0.9 fig1x} exec showpage /narrowfig 50 def 1.5 dup scale {0 0 0.9 fig2x} exec showpage /narrowfig 0 def 60 0 translate 1.5 dup scale {0 0 0.9 fig3x} exec showpage /narrowfig 50 def 1.5 dup scale { 0 0 0.9 fig4x} exec showpage /narrowfig 0 def /surl{}def /maildon{} def /tinaja {} def -100 150 translate 1.5 dup scale {0 -6 1 help} exec showpage /showreaderservicenumber true def /showadgrays false def /tinton1 {black} def 1.5 dup scale {0 31 21 add 1 ad1} exec showpage 0 -400 translate 1.5 dup scale {0 31 21 add 1 ad1} exec showpage } if