Path: utzoo!attcan!uunet!cs.utexas.edu!usc!ucsd!ucbvax!vax.oxford.ac.uk!MMAC From: MMAC@vax.oxford.ac.uk (The_Edible_Dormouse) Newsgroups: comp.text.tex Subject: windows in LaTeX Message-ID: <9007181350.AA22847@ucbvax.Berkeley.EDU> Date: 17 Jul 90 09:51:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 54 Here's another little postscript 'short' to include as a \special...add it after you after produced your final layout as it needs to be measured up. Its effect? Draws a window (shaded box with darker shadow) over a table, area of text etc below the \special command. Anyone out there really clever want ot work out a way to make it automatically scale? :-) This is based on a routine on my local vax...all credit to OUCS as far as I know...all blame to me of course. %----------------------start of ps file-------------------------- % first part draws the light shaded rectangle 72 72 scale % units are now inches instead of big points newpath % prepare to draw a rectangle -.1 -0.3 moveto % top left corner is a little left and above origin 0 -0.9 rlineto % down 1.2 (depth of your box) 5.3 0 rlineto % right 5.5 (width of your box) 0 0.9 rlineto % up 1.2 closepath % complete rectangle gsave % save current path .92 setgray % use very light shading on LaserWriter (0=black, 1=white) fill % paint interior of rectangle grestore % restore current path .01 setlinewidth % thickness of borders stroke % paint borders newpath 0 -1.2 moveto % these next lines draw the shadow of the window 0 -0.1 rlineto % the dimensions are in inches and are x,y ordered 5.3 0 rlineto % all movement commands are relative 0 0.9 rlineto -0.1 0 rlineto 0 -0.8 rlineto closepath 0 setgray fill showpage %-----------------------end of ps file----------------- The effect is very impressive---looks quite 'dtpish' if used sparingly. Edi =============================================================================== MMAC@UK.AC.OX.VAX (Janet) = The opinions expressed above are MMAC%VAX.OX.AC.UK@UKACRL.BITNET (Bitnet) = not necessarily those of any person MMAC%VAX.OXFORD.AC.UK@NSS.CS.UCL.AC.UK = living, dead, undead or the subject (Internet) = of a Schrodinger's cat experiment. "Trust me I'm a Physicist !" = They may or may not be my own. ===============================================================================