riddle@ut-sally.UUCP (Prentiss Riddle) (11/28/84)
I've recently installed ditroff on ut-sally (a vax 780 running 4.2bsd) and am quite pleased. Ditroff stands for Device-Independent Troff and, among its other features, provides for the inclusion of graphics in the middle of text by the use of languages like pic and ideal. I've run into a couple of snags, though, and I wonder if anyone out there has any insight into them. The main problem seems trivial but for certain applications simply can't be ignored: ditroff screws up square roots (as produced using the preprocessor deqn). Specifically, the horizontal bar which should appear over the expression to be sqrted is too low and is dashed rather than solid. It appears that the "root extender" character \(rn is somehow at fault. I've used rst2ch to browse around in the likely raster files, but I can't even find the \(rn character to check it. Any ideas where \(rn should be or how I could fix the problem? This may or may not be related to another difficulty which I've already solved: Because of licensing complications, the ditroff distribution tape we received didn't include raster files for our output device, an Imagen Imprint-10. The distribution tape did include width files, however, which contained at least a few minor inconsistencies with the raster files we got from Imagen -- specifically, the width files thought that certain fonts should contain ligatures that weren't there. Once I had identified the problem, it was relatively simple to amend the width files to eliminate the hallucinatory ligatures. Any hints, hunches, or suggestions would be appreciated. Also, if folks want to show off their snazziest illustrations using pic, I'll be happy to ooh and ahh. --- Prentiss Riddle ("Aprendiz de todo, maestro de nada.") --- {ihnp4,harvard,seismo,gatech,ctvax}!ut-sally!riddle
riddle@ut-sally.UUCP (Prentiss Riddle) (12/05/84)
> The main problem seems trivial but for certain applications simply can't be > ignored: ditroff screws up square roots (as produced using the preprocessor > deqn). Specifically, the horizontal bar which should appear over the > expression to be sqrted is too low and is dashed rather than solid. It > appears that the "root extender" character \(rn is somehow at fault. I've > used rst2ch to browse around in the likely raster files, but I can't even > find the \(rn character to check it. Any ideas where \(rn should be or how > I could fix the problem? Apparently I'm not alone in having trouble with ditroff. Steve Hubert (...ihnp4!uw-beaver!entropy!hubert) reports a similar problem, but with one intriguing difference: his square roots are fine but the horizontal lines in fractions (produced by deqn "over") are dashed! Does this suggest anything to anyone? --- Prentiss Riddle ("Aprendiz de todo, maestro de nada.") --- {ihnp4,harvard,seismo,gatech,ctvax}!ut-sally!riddle
hubert@entropy.UUCP (Steve Hubert) (12/07/84)
> > The main problem seems trivial but for certain applications simply can't be > > ignored: ditroff screws up square roots (as produced using the preprocessor > > deqn). Specifically, the horizontal bar which should appear over the > > expression to be sqrted is too low and is dashed rather than solid. It > > appears that the "root extender" character \(rn is somehow at fault. I've > > used rst2ch to browse around in the likely raster files, but I can't even > > find the \(rn character to check it. Any ideas where \(rn should be or how > > I could fix the problem? > > Apparently I'm not alone in having trouble with ditroff. Steve Hubert > (...ihnp4!uw-beaver!entropy!hubert) reports a similar problem, but with one > intriguing difference: his square roots are fine but the horizontal lines in > fractions (produced by deqn "over") are dashed! Does this suggest anything > to anyone? > > --- Prentiss Riddle ("Aprendiz de todo, maestro de nada.") > --- {ihnp4,harvard,seismo,gatech,ctvax}!ut-sally!riddle I have solved my deqn problem by changing deqn so it uses the new line drawing capabilities to draw the ``over'' line rather than the old \l line drawer. Here is a diff on eqn/over.c. 17a18,21 > /* > * Change over to use the new line drawing command instead > * of the old series of underrules. Hubert, 5 Dec 84 > */ 22c26 < printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du'\\l'\\n(%du-.2m'\\h'.1m'\\v'%du'\n", --- > printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du-.1m'\\D't.005i'\\D'l\\n(%du-.2m 0u'\\D't.015i'\\h'.1m'\\v'%du+.1m'\n", Perhaps the line drawer could be used to draw the root extender, too. What changed is \l is replaced by \D l. There are a couple other nasty things. The default linewidth for \D on the Versatec is .015i. That is too wide for ``over''. So I change the linewidth to .005i, draw the line, then change it to .015i. That means the linewidth is set to .015i after an over regardless of what it was before. I couldn't think of any way to find out what the width was on entry to the over() routine. I also made the vertical movement right before the line go down 1/10th em less than before, and 1/10th em more after the line. That is so the line lined up where it was supposed to go. Another side effect that just occurred to me is that there is no way to get a bold over with this change. Two questions: Is there any way to determine the linewidth so I can save it and restore it after drawing the line? Is there any way to determine whether the over line is supposed to be bold? Hmmm, maybe I ought to just fix the rule character in my fonts instead :-). Steve Hubert Dept. of Stat., U. of Wash, Seattle {allegra,decvax,ihnp4,ucbvax!lbl-csam}!uw-beaver!entropy!hubert hubert%entropy@uw-beaver
rusty@sdcc3.UUCP (Rusty Wright) (12/08/84)
> > The main problem seems trivial but for certain applications simply can't be > > ignored: ditroff screws up square roots (as produced using the preprocessor > > deqn). Specifically, the horizontal bar which should appear over the > > expression to be sqrted is too low and is dashed rather than solid. It > > appears that the "root extender" character \(rn is somehow at fault. I've > > used rst2ch to browse around in the likely raster files, but I can't even > > find the \(rn character to check it. Any ideas where \(rn should be or how > > I could fix the problem? > > Apparently I'm not alone in having trouble with ditroff. Steve Hubert > (...ihnp4!uw-beaver!entropy!hubert) reports a similar problem, but with one > intriguing difference: his square roots are fine but the horizontal lines in > fractions (produced by deqn "over") are dashed! Does this suggest anything > to anyone? > > --- Prentiss Riddle ("Aprendiz de todo, maestro de nada.") > --- {ihnp4,harvard,seismo,gatech,ctvax}!ut-sally!riddle could it be that the width table has an incorrect value for the width of these glyphs? try changing it to be somewhat smaller.