[comp.unix.ultrix] xdvi for DECstation?

rcpt@eutrc4.urc.tue.nl (Piet Tutelaers) (10/25/89)

I am desperately looking for a good TeX-previewer for a DECstation 3100.
I have tried to compile xdvi and after some troubles, I have managed to
get a running xdvi. (The problems I had to overwin were: DECwindows does
not support Viewport.h and Simple.h in their /usr/include/X11. If I use
instead /usr/include/mit/X11 the compilation succeeds. DECwindows does not
supports libXmu.a, the library needed by xdvi. I have made this from the
standard X11 version 3 release.) This xdvi has several problems:
	- the output looks terrible, the mapping of TeX-pkfonts to the
	  DECwindow server seems wrong,
	- the xdvi window does not react on keyboard commands (for example
	  `n'  for next-page), only ^C.
If we run the same xdvi on a X11 display terminal (NCD) and we use the default
X11 window manager `uwm', the output is correct and the keyboard is seen.

Does anyone has succesfully ported xdvi to DECstations?

(If xdvi misses a font the program gets aborted! This is a very unwanted
feature!)
------------------------------------------------------------------
uucp:   rcpt@urc.tue.nl       | Piet Tutelaers        Room  RC 1.90
bitnet: rcpt@heithe5.BITNET   | Eindhoven University of  Technology
phone:  +31 (0)40 474541      | P.O. Box 513, 5600 MB Eindhoven, NL

jtkohl@quicksilver.mit.edu (John T Kohl) (10/26/89)

In article <1223@eutrc3.urc.tue.nl> rcpt@eutrc4.urc.tue.nl (Piet Tutelaers) writes:

>I am desperately looking for a good TeX-previewer for a DECstation 3100.

The xdvi we have here at MIT Project Athena, from comp.sources.x, Volume
3, issues 37-39 and 46, plus other patches (from expo.lcs.mit.edu?
geneaology here is fuzzy), up to PATCHLEVEL 3, works fine for me on my
DECstation 3100.  Patchlevel 5 (in fully-applied form) is available by
anonymous FTP from expo.lcs.mit.edu, /contrib/xdvi.shar.Z.

>DECwindows does not supports libXmu.a

Sounds like you are still running Ultrix 3.0/UWS 2.0.  Talk to your
sales rep and get an upgrade to Ultrix 3.1/UWS 2.1.  It includes full
X11R3-level code (bugs and all!).

>	- the output looks terrible, the mapping of TeX-pkfonts to the
>	  DECwindow server seems wrong,

The output looks a bit screwy (extra/missing bits), but for my purposes
(usually layout examination) it is just fine.  With no sampling (i.e.
size 1) it looks fine.  This is all with PK fonts for write-white engines.

The keyboard input works fine for me under the Motif Window manager; are
you setting the focus properly (select the window)?
--
John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@Kolvir.Brookline.MA.US>
Digital Equipment Corporation/Project Athena
(The above opinions are MINE.  Don't put my words in somebody else's mouth!)

riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (10/26/89)

In article <1223@eutrc3.urc.tue.nl> rcpt@eutrc4.urc.tue.nl (Piet Tutelaers) writes:
>DECwindows does not
>supports libXmu.a, the library needed by xdvi. I have made this from the
>standard X11 version 3 release.)

libXmu.a is include in Ultrix 3.1/UWS 2.1.  At least, I think that's where
it came from...

>	- the output looks terrible, the mapping of TeX-pkfonts to the
>	  DECwindow server seems wrong,

I had this problem the first time I linked xdvi with the DEC supplied
libraries.  The solution was to not define MSBITFIRST, and define BMLONG.
For some reason I didn't have this problem when I linked xdvi with the
MIT libraries (compiled from the X11R3 distribution), and ran it under
UWS 2.0 with uwm.

>	- the xdvi window does not react on keyboard commands (for example
>	  `n'  for next-page), only ^C.

As several people have pointed out, xdvi needs to set XtNinput.  Since the
xdvi Xt code is stolen from xterm, I stole a little more.  The following
patch will get xdvi to accept keyboard input under dxwm.  I'm not enough of
an Xt expert to know if this is the right way to do it--I rather suspect that
it isn't--but anything else would have required much more extensive
revisions, as far as I could tell.  Anyway, with these changes I have an
xdvi that works with dxwm.

*** xdvi.c.old	Mon Oct 16 12:15:39 1989
--- xdvi.c	Mon Oct 16 13:00:53 1989
***************
*** 1656,1661 ****
--- 1656,1662 ----
  	{XtNwidth,	(XtArgVal) 0},
  	{XtNheight,	(XtArgVal) 0},
  	{XtNiconPixmap,	(XtArgVal) 0},
+ 	{XtNinput,	(XtArgVal) True},
  };
  
  #else	TOOLKIT
***************
*** 2010,2016 ****
  	temp_args3[2].value = (XtArgVal) (XCreateBitmapFromData(DISP,
  				RootWindowOfScreen(SCRN),
  				xdvi_bits, xdvi_width, xdvi_height));
! 	XtSetValues(top_level, temp_args3, 3);
  
  	vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
  		top_level, vport_args, XtNumber(vport_args));
--- 2011,2017 ----
  	temp_args3[2].value = (XtArgVal) (XCreateBitmapFromData(DISP,
  				RootWindowOfScreen(SCRN),
  				xdvi_bits, xdvi_width, xdvi_height));
! 	XtSetValues(top_level, temp_args3, 4);
  
  	vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
  		top_level, vport_args, XtNumber(vport_args));


-Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley)
-Wilson Lab, Cornell U.

pusateri@macbeth.cs.duke.edu (Thomas J. Pusateri) (10/26/89)

In article <1223@eutrc3.urc.tue.nl> rcpt@eutrc4.urc.tue.nl (Piet Tutelaers) writes:
>
>I am desperately looking for a good TeX-previewer for a DECstation 3100.
>I have tried to compile xdvi and after some troubles, I have managed to


I could not get the X11R3 version to work under DecWindows either. I went
back to the X11R2 old contrib on expo and got that version of xdvi and
it compiled with no problems. By default xdvi gives you the full previewed
page and is usually hard to read. But if you use the command xdvi -s 2
(shrink factor only 2 instead of 4 by default) then the page comes out
looking very nice.

Good luck

Tom Pusateri

pusateri@nbsr.duke.edu

jim@calvin.EE.CORNELL.EDU (Jim Providakes) (10/26/89)

Yes, we ported XDVI over to the DECstation 3100.  We also used the MIT
library (not supplied by DEC) called libXmu.a to compile and link XDVI.
It seems to work fine for us on our monochrome DECstations (the
bitmaps  look great).  However, I suspect your problem may be that you
are  using a color monitor (xcfb server).  Ultrix 3.0 color server
apparently has a bug since on our color DECstations, XDVI generated
bitmap  fonts that seemed to be missing dots (making reading almost
impossible).  Ultrix 3.1 fixes this problem, and XDVI runs great on color
DECstations (write speed is incredibly fast for a color workstation).
No recompiling of XDVI was necessary just the system upgrade.

The other problem with XDVI of window focus is not really DEC's fault but
that XDVI failed to make the appropriate call to the X server to allow 
the window manager to focus on the XDVI window.  To allow the keyboard
to focus on the XDVI window for DECwindows (ie, the dxwm window
manager), simply add the line "input:  true" to your .Xdefaults file.

Hope this helps.