[comp.windows.open-look] advice sought, mixing X11/NeWS

steve@hanauma.Stanford.EDU (Steve Cole) (02/07/91)

Recently I posted asking for help displaying NeWS graphics in an
X11 program. My problem at the time was figuring out how to tell the
server which X11 window to plot NeWS graphics in. I got several very helpful 
replies, and I want to thank those who responded (some of my e-mail
thank you messages bounced). I'll summarize results by e-mail if anyone 
is interested.
 
Now I have a new problem, and am hoping that someone with relevant
experience can point me in the direction of a solution. For those of you
familiar with the Xtex previewer for TeX documents, my project is
supporting NeWS graphics in Xtex. This will allow you to preview documents 
with included PostScript figures. Previously Xtex supported Display 
PostScript, but not NeWS.
 
I've written all the code and it's working fine - on 1 of my 3 machines.
I preview the document, figures come up in the right place and sized
properly and all that. But on 2 machines some figures will have problems.
The coordinates of the included PostScript figure will get mangled somehow,
and the figure will plot all wrong, all over the screen. These figures work 
fine on the first machine, and I can preview them with pageview on all 3
machines. Two of my machines are dataless clients of the third, so there 
should be no question of software differences. The one where it works has a 
smaller screen (but I doubt this means anything) and there are differences 
in memory and swap space but the machine where it works has the smallest 
amount of memory of the 3.

I've found that scaling the PostScript figures down in size makes them
plot ok on all machines. This scaling does no harm, since Xtex scales figures 
to fit in the right place on the screen anyway. It's not that the scaling
makes the PostScript files any shorter, it just means that the coordinate
values in the file are smaller. Scaling is especially helpful with files 
containing 300 dpi rasters, which I have to scale down quite a bit in order 
to get them to work on certain machines. 

So, does anyone have any experience that might shed some light on this?
Does this sound like a problem with running out of memory? Should scaling
the PostScript file help the X11/NeWS server avoid memory problems, even though
scaling does not make the file any shorter? Or is it something other
than memory?

Sorry for such a long post, but the problem is involved and I wanted to
give a thorough description. Any advice will be greatly appreciated.
The NeWS support should show up soon in a new version of Xtex, but I'll
be a lot happier if people can just supply any PostScript figure, and not
have to worry about scaling it down first so it will preview ok.

Thanks again for your time and interest.
-----------------------------------------------------------------
Steve Cole  (steve@hanauma.stanford.edu, apple!hanauma!steve)
Department of Geophysics, Stanford University, Stanford, CA 94305