[comp.soft-sys.andrew] Help formatting problem

ckk+@ANDREW.CMU.EDU (Chris Koenigsberg) (05/22/91)

This is a common problem with the ATK Help program and its rofftext
object. There are Ultrix and SunOS man pages which fail to display
correctly in Help for similar reasons.

Basically, I think the only way to get Help/rofftext to display these
correctly is to tinker with your ${ANDREWDIR}/lib/tmac/tmac.atk - you
may have to add every vendor-specific macro used by every man page to
the tmac.atk, because Help/rofftext does not know to look in
/usr/lib/tmac/tmac.an for macro definitions when processing man pages,
it only looks in ${ANDREWDIR}/lib/tmac/tmac.atk.

If you're running rofftext by hand, you can give it the "rofftext -man"
switch just as you'd invoke "nroff -man" by hand, but the Help
application doesn't point the rofftext object at the /usr/lib macros the
way it should.

There are other problems inherent to Help/rofftext's handling of man
pages that we (CMU's Academic Computing and Media) have reported to the
ITC over the years, and we would love to see them fixed before
patchlevel 10 is released. (hint hint :-) I guess we had given up by
now, but I'll mention it again just in case :-)

Another pet Help/rofftext peeve: many man pages do a ".so" to include a
different man page. But they assume that the current working directory
is /usr/man, so they do a ".so man3/foo.3" for example. And the "man"
program does a chdir to /usr/man (or whatever MANPATH element the file
was found under) before invoking nroff.

The rofftext object does NOT change the current working directory when
reading man pages the way the 'man' program does, and so this
relative-pathname reference fails.

Chris Koenigsberg, Senior User Consultant
ckk+@andrew.cmu.edu
Distributed Workstation Services, Carnegie-Mellon University
-------------------------
Excerpts from internet.info-andrew: 21-May-91 Help formatting problem
Susan Schwarz@northstar. (8475)


> I have recently ported NCAR Graphics V3.0 to our Sparcstations,  IBM RTs
> and RS600s and am having trouble getting the NCAR man pages to appear
> correctly when using the ATK help utility.  We are running ATK4 patch
> level 9. When I use  help to display the man pages,  many of the vowels 
> are missing from the text.   When I use the 'man' utility on them, the
> man pages appear correctly.

>  The NCAR man files reference a specific troff  macro file that comes
> with NCAR and I think that macro file may be causing the problem

gk5g+@ANDREW.CMU.EDU (Gary Keim) (05/22/91)

Excerpts from misc: 21-May-91 Help formatting problem Susan
Schwarz@northstar. (8475)

> I have recently ported NCAR Graphics V3.0 to our Sparcstations,  IBM RTs
> and RS600s and am having trouble getting the NCAR man pages to appear
> correctly when using the ATK help utility. 

Here is how it looks to me when viewed via help.  Let me know if this
isn't correct.


DASHSMTH(3NCARG)    NCAR GRAPHICS    









NAME 


DASHSMTH  - Software dashed-line package with character capability and
smoothing



SYNOPSIS 
CALL DASHDC (IPAT,JCRT,JSIZE)  
CALL DASHDB (IPAT)
CALL CURVED (X,Y,N)
CALL FRSTD (X,Y)
CALL VECTD (X,Y)
CALL LINED (XA,XB,YA,YB) no smoothing
CALL LASTD Called after last point is processed




DESCRIPTION


Latest Revision 
August 1987 

Purpose 
DASHSMTH is a software dashed-line package with smoothing capabilities.
DASHSMTH is DASHCHAR with smoothing features added. 

Usage 
First, either 
CALL DASHDB (IPAT) 
where IPAT is a 16-bit dash pattern as described in the subroutine
DASHDB (see DASHLINE documentation), or 
CALL DASHDC (IPAT,JCRT,JSIZE) 
as described below. 

Then, call any of the following: 
CALL CURVED (X,Y,N)
CALL FRSTD (X,Y)
CALL VECTD (X,Y)
CALL LASTD


LASTD is called only after the last point of a line has been processed
in VECTD. 

The following may also be called, but no smoothing will result: 
CALL LINED (XA,YA,XB,YB) 

ARGUMENTS 

On Input to DASHDC 
	IPAT A character string of arbitrary length (60 characters seems to be
a practical limit) that specifies the dash pattern to be used. A dollar
sign in IPAT indicates solid; an apostrophe indicates a gap; blanks are
ignored. Any character in IPAT that is not a dollar sign, apostrophe, or
blank is considered to be part of a line label. Each line label can be
at most 15 characters in length. Sufficient white space is reserved in
the dashed line for writing line labels. 

	JCRT The length in plotter address units per $ or apostrophe. 

	JSIZE Is the size of the plotted characters: 

	* If between 0 and 3, it is 1., 1.5, 2. and 3. times an 8 plotter
address unit width. 

	* If greater than 3, it is the character width in plotter address units. 

To Other Line-Drawing Routines 
	CURVED(X,Y,N) X and Y are arrays of world coordinate values of length N
or greater. Line segments obeying the specified dash pattern are drawn
to connect the N points. 

	FRSTD(X,Y) The current pen position is set to the world coordinate
value (X,Y). 

	VECTD(X,Y) A line segment is drawn between the world coordinate value
(X,Y) and the most recent pen position. (X,Y) then becomes the most
recent pen position. 

	LINED(XA,XB,YA,YB) A line is drawn between world coordinate values
(XA,YA) and (XB,YB). 

	LASTD When using FRSTD and VECTD, LASTD must be called (no arguments
needed). LASTD sets up the calls to the smoothing routines KURV1S and
KURV2S. 

On Output 
All arguments are unchanged for all routines. 

Note 
When switching from the regular plotting routines to a dashed-line
package the first call should not be to VECTD. 

Entry Points 
DASHDB, DASHDC, CURVED, FRSTD, VECTD, LINED, RESET, LASTD, KURV1S,
KURV2S, CFVLD, FDVDLD, DRAWPV, DASHBD 

Common Blocks 
INTPR, DASHD1, DASHD2, DDFLAG, DCFLAG, DSAVE1, DSAVE2, DSAVE3, DSAVE5,
CFFLAG, SMFLAG, DFFLAG, FDFLAG 

Required Library Routines 
The ERPRT77 package and the SPPS. 

Required GKS Level 
0A 

I/O 
Plots solid or dashed lines, possibly with characters at intervals in
the line. The lines may also be smoothed. 

Precision 
Single 

Language 
FORTRAN 77 

History 
Written in October 1973. Made portable in September 1977 for use with
all machines that support plotters with up to 15 bit resolution.
Converted to FORTRAN 77 and GKS in June 1984. 

Algorithm 
Points for each line segment are processed and passed to the routines,
KURV1S and KURV2S, which compute splines under tension passing through
these points. New points are generated between the given points,
resulting in smooth lines. 

Accuracy 
Plus or minus .5 plotter address units per call. There is no cumulative error. 

Timing 
About three times as long as DASHCHAR. 


Gary Keim
ATK Group