PROBLEMS revision 75584
118099SpstThis file describes various problems that have been encountered in
218099Spstcompiling, installing and running groff.  Suggestions for additions or
318099Spstother improvements to this file are welcome.
418099Spst
569626Sru----------------------------------------------------------------------
669626Sru
769626Sru* My document says that the current year is 19100, not 2000.
869626Sru
969626SruIn groff, as in traditional troff, the yr number register yields the
1069626Sruyear minus 1900.  Unfortunately, there is a longstanding bug in the
1169626SruTroff User's Manual <http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz>,
1269626Sruwhich incorrectly claims that yr is the last two digits of the year.
1369626SruThis claim was never true of either Unix troff or of groff.
1469626Sru
1569626SruIf your text looks like this:
1669626Sru
1769626Sru	.\" Wrong:
1869626Sru	This document was formatted in 19\n(yr.
1969626Sru
2069626Sruyou can correct it as follows:
2169626Sru
2269626Sru	This document was formatted in \n[year].
2369626Sru
2469626Sruor, if you want to be portable to older troff versions, as follows:
2569626Sru
2669626Sru	.nr y4 1900+\n(yr
2769626Sru	This document was formatted in \n(y4.
2869626Sru
2969626Sru----------------------------------------------------------------------
3069626Sru
3118099Spst* I get lots of `numeric overflow' error messages whenever I run
3269626Sru  groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler.
3318099Spst
3418099SpstMake sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level
3518099SpstMakefile.  If that doesn't solve the problem, define INT_MIN as
3618099Spst-INT_MAX in libgroff/lib.h.
3718099Spst
3869626Sru----------------------------------------------------------------------
3955839Sasmodai
4069626Sru* I get errors when I try to compile groff with Sun C++ version 5.0
4169626Sru  or 5.1.
4269626Sru
4355839SasmodaiThis is a known problem; see Sun bug #4301919.  As of this writing, no
4455839Sasmodaipatch is available.  Use GCC 2.95.2 or later instead.
4555839Sasmodai
4669626Sru----------------------------------------------------------------------
4769626Sru
4818099Spst* I get errors when I try to compile groff with Sun C++ version 3 or
4969626Sru  earlier.
5018099Spst
5118099SpstGroff requires header files that are moderately compatible with AT&T
5218099SpstC++ and ANSI C.  With some versions of Sun C++, the supplied header
5318099Spstfiles need some of the following changes to meet this requirement:
5418099Spst<string.h> must declare the mem* functions, (just add `#include
5518099Spst<memory.h>' to <string.h>); the first argument to fopen and freopen
5618099Spstshould be declared as `const char *'; the first argument to fread
5718099Spstshould be declared as `void *'; the first argument to fwrite should be
5869626Srudeclared as `const void *'; malloc should be declared to return
5969626Sru`void *'; in <alloca.h>, the declaration `extern "C" { void
6069626Sru*__builtin_alloca(int); }' should be added; in <sys/signal.h> the
6169626Srureturn type and the second argument type of signal() should be changed
6269626Sruto be `void (*)(int)'.
6318099Spst
6418099SpstYou can either change them in place, or copy them to some other
6518099Spstdirectory and include that directory with a -I option.
6618099Spst
6769626Sru----------------------------------------------------------------------
6869626Sru
6969626Sru* The configure script fails on OS/390 Unix.
7069626Sru
7169626SruThere is a bug in the Language Environment (LE) whereby the test
7269626Sruprogram for static destructors fails.  You will see the message
7369626Sru'configure: error: a working C++ compiler is required'
7469626Sru
7569626SruApplying PTF UQ42006 is supposed to fix this, but the test program is
7669626Srustill returning the wrong value (1).  To work around this problem, you
7769626Srucan comment out the following in the configure script (near line 956).
7869626SruThis will effectively bypass the test (static constructors and
7969626Srudestructors do actually work properly):
8069626Sru
8169626Sru#if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8269626Sru#then
8369626Sru  echo "$ac_t""yes" 1>&6
8469626Sru#else
8569626Sru#  echo "configure: failed program was:" >&5
8669626Sru#  cat conftest.$ac_ext >&5
8769626Sru#  rm -fr conftest*
8869626Sru#  echo "$ac_t""no" 1>&6;{ echo "configure: error: a working C++ compiler is required" 1>&2; exit 1; }
8969626Sru#fi
9069626Sru
9169626Sru----------------------------------------------------------------------
9269626Sru
9318099Spst* I get errors when I try to compile groff with DEC C++.
9418099Spst
9518099SpstFix the declaration of write() in <unistd.h> so that the second
9618099Spstargument is a const char *.  Fix the declaration of open() in
9718099Spst<sys/file.h> so that the first argument is a const char *.
9818099Spst
9969626Sru----------------------------------------------------------------------
10069626Sru
10169626Sru* On a host using Unix make (e.g. Solaris), if you are compiling for
10269626Sru  multiple architectures by building in a subdirectory, the make stops
10369626Sru  with a message like this:
10469626Sru
10569626Sru    make: Fatal error: Don't know how to make target `assert.o'
10669626Sru
10769626Sru  or like this:
10869626Sru
10969626Sru    make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory
11069626Sru
11169626SruThis occurs because GNU make and Unix make handle VPATH differently,
11269626Sruand the groff build relies on GNU make's VPATH handling.
11369626Sru
11469626SruUse GNU make to work around the problem.  In Solaris 8, GNU make is
11569626Sruon the Software Companion CD and is installed as /opt/sfw/bin/gmake.
11669626Sru
11769626Sru----------------------------------------------------------------------
11869626Sru
11918099Spst* On Ultrix, the make stops with the message
12018099Spst
12175584Sru    *** Error code 1
12218099Spst
12375584Sru    Stop.
12418099Spst
12575584Sru  for no apparent reason.
12618099Spst
12718099SpstUse GNU make.
12818099Spst
12969626Sru----------------------------------------------------------------------
13069626Sru
13118099Spst* I'm having problems compiling groff on 386BSD 0.1.
13218099Spst
13318099SpstIf you're using ash as /bin/sh, you'll need the following patch.
13418099Spst
13518099Spst*** gendef.sh.org	Sun Jun 30 13:30:36 1991
13618099Spst--- gendef.sh	Sun Feb 28 10:23:49 1993
13718099Spst***************
13818099Spst*** 3,9 ****
13918099Spst  file=$1
14018099Spst  shift
14118099Spst  
14218099Spst! defs="#define $1"
14318099Spst  shift
14418099Spst  for def
14518099Spst  do
14618099Spst--- 3,10 ----
14718099Spst  file=$1
14818099Spst  shift
14918099Spst  
15018099Spst! x=$1
15118099Spst! defs="#define $x"
15218099Spst  shift
15318099Spst  for def
15418099Spst  do
15518099Spst
15618099SpstYou'll also need to change dirnamemax.c so that it doesn't use
15718099Spstpathconf().
15818099Spst
15969626Sru----------------------------------------------------------------------
16069626Sru
16118099Spst* While compiling on Xenix, ranlib libgroff.a fails.
16218099Spst
16318099SpstThe system ranlib can't handle externals longer than 40 characters.
16418099SpstUse the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1
16518099Spstinstead.
16618099Spst
16769626Sru----------------------------------------------------------------------
16869626Sru
16969626Sru* There are many empty `Makefile.dep' files.  Is this a bug?
17069626Sru
17169626SruNo.  Real dependency files are created with a `make depend' call.
17269626Sru
17369626Sru----------------------------------------------------------------------
17469626Sru
17575584Sru* Groff can't handle my troff document.  It works fine with AT&T troff.
17618099Spst
17718099SpstRead the section on incompatibilities in gtroff(1).  Try using the -C
17875584Sruoption.  Alternatively there's the sed script `tmac/fixmacros.sed'
17918099Spstwhich will attempt to edit a file of macros so that it can be used
18018099Spstwith groff without the -C flag.
18118099Spst
18269626Sru----------------------------------------------------------------------
18318099Spst
18469626Sru* groff -Tdvi produces dvi files that use fonts at weird
18569626Sru  magnifications.
18669626Sru
18718099SpstYes, it does.  You may need to compile fonts with Metafont at these
18869626Srumagnifications.  The CompileFonts script in the devdvi/generate
18975584Srudirectory may help you to do this.  (It will take a *long* time on
19075584Sruslow computers.)
19118099Spst
19269626Sru----------------------------------------------------------------------
19369626Sru
19418099Spst* pic output is not centered horizontally; pictures sometimes run off
19569626Sru  the bottom of the page.
19618099Spst
19769626SruThe macro package you are using is not supplying appropriate
19869626Srudefinitions of PS and PE.  Give groff a -mpic option.
19918099Spst
20069626Sru----------------------------------------------------------------------
20118099Spst
20269626Sru* I'm having problems including PostScript illustrations using the
20369626Sru  PSPIC macro.
20469626Sru
20518099SpstA PostScript document must meet three requirements in order to be
20618099Spstincluded with the PSPIC macro: it must comply with the Adobe Document
20718099SpstStructuring Conventions; it must contain a BoundingBox line; it must
20818099Spstbe ``well-behaved''.  The BoundingBox line should be of the form:
20918099Spst
21018099Spst  %%BoundingBox: llx lly urx ury
21118099Spst
21218099Spstwhere llx, lly, urx, ury are the coordinates of the lower left x,
21318099Spstlower left y, upper right x, upper right y of the bounding box of
21418099Spstmarks on the page expressed as integers in the default PostScript
21518099Spstcoordinate system (72 units per inch, origin at bottom left corner).
21618099SpstA useful tactic is to print out the illustration by itself (you may
21718099Spstneed to add a `showpage' at the end), and physically measure the
21818099Spstbounding box.  For more detail on these requirements, read the
21918099Spstspecification of Encapsulated PostScript format.  (This is available
22018099Spstfrom the Adobe file server; send a message with a body of `help' to
22118099Spstps-file-server@adobe.com.)
22218099Spst
22369626Sru----------------------------------------------------------------------
22469626Sru
22518099Spst* I've configured groff for A4 paper, but gtroff still seems to think
22675584Sru  that the length of a page (as returned by `\n(.p') is 11 inches.
22718099Spst
22818099SpstThis is intentional.  The PAGE option is used only by grops.  For
22918099Spstcompatibility with ditroff, the default page length in gtroff is
23018099Spstalways 11 inches.  The page length can be changed with the `pl'
23118099Spstrequest.
23218099Spst
23369626Sru----------------------------------------------------------------------
23469626Sru
23575584Sru* groff produces wrapper macros for `ms' and friends which call the
23675584Sru  system's original macros.  Then, to get groff's ms macro package I
23775584Sru  have to use `-mgs' instead `-ms'.  Can I avoid this?
23875584Sru
23975584SruYes.  Configure and compile groff as usual, but install it with
24075584Sru
24175584Sru  make install tmac_wrap=""
24275584Sru
24375584SruThen no wrapper files are produced, and `-ms' will use groff's `ms'
24475584Srumacros.
24575584Sru
24675584Sru----------------------------------------------------------------------
24775584Sru
24818099Spst* Groff doesn't use the font names I'm used to.
24918099Spst
25075584SruUse the `ftr' request.  See (g)troff(1).
25118099Spst
25269626Sru----------------------------------------------------------------------
25369626Sru
25418099Spst* I get errors using the Unix -ms macros with groff -e -C.
25518099Spst
25618099SpstApply this change:
25718099Spst
25818099Spst*** /usr/lib/ms/ms.eqn	Tue Apr 25 02:14:28 1989
25918099Spst--- ms.eqn	Sun Nov 11 10:33:59 1990
26018099Spst***************
26118099Spst*** 22,29 ****
26218099Spst  ..
26318099Spst  .	\" EN - end of a displayed equation
26418099Spst  .de EN
26518099Spst! .if !\\*(10 .br
26618099Spst  .di
26718099Spst  .rm EZ
26818099Spst  .nr ZN \\n(dn
26918099Spst  .if \\n(ZN>0 .if \\n(YE=0 .LP
27018099Spst--- 22,30 ----
27118099Spst  ..
27218099Spst  .	\" EN - end of a displayed equation
27318099Spst  .de EN
27418099Spst! .if \\n(.k>0 .br
27518099Spst  .di
27618099Spst+ .ds 10 \\*(EZ\\
27718099Spst  .rm EZ
27818099Spst  .nr ZN \\n(dn
27918099Spst  .if \\n(ZN>0 .if \\n(YE=0 .LP
28018099Spst
28169626Sru----------------------------------------------------------------------
28218099Spst
28369626Sru* gpic doesn't accept the syntax `chop N M' for chopping both ends of
28469626Sru  a line.
28518099Spst
28618099SpstThe correct syntax is `chop N chop M'.
28718099Spst
28869626Sru----------------------------------------------------------------------
28918099Spst
29069626Sru* With gpic -t, when I print `line ->; box' using a dvi to ps program,
29169626Sru  the arrow head sticks through into the inside of the box.
29218099Spst
29369626SruThe dvi to ps program should be modified to set the line cap and line
29469626Srujoin parameters to 1 while printing tpic specials.
29569626Sru
29669626Sru----------------------------------------------------------------------
29769626Sru
29818099Spst* When I print the output groff -Tps, the output is always shifted up
29969626Sru  by about 0.7 inches; I'm using 8.5x11 inch paper.
30018099Spst
30118099SpstMake sure that PAGE is defined to be `letter' in the top-level
30218099SpstMakefile.
30318099Spst
30469626Sru----------------------------------------------------------------------
30569626Sru
30618099Spst* When I try to print the output of groff -Tps, I get no output at all
30769626Sru  from the printer, and the log file shows the error
30869626Sru  %%[ error: undefined; offendingcommand: BP ]%%
30969626Sru  I'm using TranScript spooling software.
31018099Spst
31118099SpstThis is a bug in the page reversal filter in early versions of
31218099SpstTranScript.  Change the `broken' parameter in
31318099Spst/usr/local/lib/groff/font/devps/DESC to 7.
31418099Spst
31569626Sru----------------------------------------------------------------------
31618099Spst
31769626Sru* When I preview groff -Tps output using the Sun OpenWindows 2.0
31869626Sru  pageview program, all the pages are displayed on top of each other.
31969626Sru
32018099SpstThis is a defect in pageview.  Change the `broken' parameter in
32118099Spst/usr/local/lib/groff/font/devps/DESC to 2.
32218099Spst
32369626Sru----------------------------------------------------------------------
32469626Sru
32555839Sasmodai* With groff -TX75, -TX100 or -X, I can only view the first page.
32618099Spst
32718099SpstThe left mouse button brings up a menu that allows you to view other
32818099Spstpages.
32918099Spst
33069626Sru----------------------------------------------------------------------
33169626Sru
33218099Spst* When I print the output of groff -Tdvi, I just get a black dot in
33369626Sru  upper left corner.
33418099Spst
33518099SpstSome dvi drivers (notably early versions of xtex) do not correctly
33618099Spsthandle dvi files that use a resolution different from that used by dvi
33718099Spstfiles produced by TeX.  Try getting a more up to date driver.
33818099Spst
33969626Sru----------------------------------------------------------------------
34069626Sru
34118099Spst* I get lots of errors when I use groff with the AT&T -mm macros.
34218099Spst
34375584SruUse the groff -mm macros.
34418099Spst
34569626Sru----------------------------------------------------------------------
34669626Sru
34718099Spst* gtroff doesn't understand lines like `.ce99' with no space between
34869626Sru  the name of the request or macro and the arguments.
34918099Spst
35069626Srugtroff requires a space between macro or request and its arguments
35118099Spstbecause it allows the use of long names for macros and requests.  You
35218099Spstcan use the -C option or the `cp' request to put gtroff into a
35318099Spstcompatibility mode in which it is not possible to use long names for
35418099Spstmacros but in which no space is required between macros and their
35518099Spstarguments.  The use of compatibility mode is strongly discouraged.
35618099Spst
35769626Sru----------------------------------------------------------------------
35869626Sru
35918099Spst* gtroff gives warnings about lines like
36018099Spst  .ev	\" a comment
36169626Sru  (with a tab after the .ev).
36218099Spst
36318099SpstA tab character cannot be used as a substitute for a space character
36418099Spst(except in one case: between a control character at the beginning of a
36518099Spstline and the name of a macro or request).  For example, in Unix troff
36669626Sru
36718099Spst  .ps	\" restore the previous point size
36869626Sru
36918099Spst(with a tab after the .ps) will NOT restore the previous point-size;
37018099Spstinstead it will be silently ignored.  Since this is very likely to be
37118099Spstan error, gtroff can give a warning about it.  If you want to align
37218099Spstcomments, you can do it like this:
37369626Sru
37418099Spst  .ev\"				\" a comment
37518099Spst
37669626Sru----------------------------------------------------------------------
37769626Sru
37818099Spst* I don't like the page headers and footers produced by groff -man.
37918099Spst
38018099SpstThere seem to be many different styles of page header and footer
38118099Spstproduced by different versions of the -man macros.  You will need to
38275584Srumodify tmac/an-old.tmac to suit your personal taste.  For example, if
38318099Spstyou want the center of the page header to say
38469626Sru
38555839Sasmodai  System Programmer's Manual
38669626Sru
38718099Spstyou will need to change the line
38869626Sru
38955839Sasmodai  .el .ds an-extra3 \"System Programmer's Manual
39069626Sru
39118099Spstto
39269626Sru
39355839Sasmodai  .el .ds an-extra3 System Programmer's Manual
39418099Spst
39569626Sru----------------------------------------------------------------------
39669626Sru
39769626Sru* While formatting a manual page, groff complains about not being able
39869626Sru  to break lines.  The problem seems to be caused by a line like:
39918099Spst  .TP \w'label'+2
40018099Spst
40118099SpstThe -man documentation says that the default scale indicator for TP
40218099Spstmacro is `n'.  The groff -man macros implement this correctly, so that
40318099Spstthe argument will be evaluated as if it were
40469626Sru
40518099Spst  \w'label'n+2n
40669626Sru
40718099SpstThe Unix -man macros don't implement this correctly (probably because
40818099Spstit's hard to do in Unix troff); they just append `n' to the entire
40918099Spstargument, so that it will be evaluated as if it were
41069626Sru
41118099Spst  \w'label'u+2n
41269626Sru
41318099SpstThe solution is to fix the manual page:
41469626Sru
41518099Spst  .TP \w'label'u+2
41618099Spst
41769626Sru----------------------------------------------------------------------
41869626Sru
41918099Spst* I'm having problems formatting Ultrix man pages with groff -man.
42018099Spst
42118099SpstThe Ultrix man pages use a number of non-standard extensions to the
42218099SpstUnix man macros.  One solution is to use the Ultrix -man macros with
42375584Srugroff.  Copy /usr/lib/tmac/tmac.an to
42475584Sru/usr/local/share/groff/site-tmac/an.tmac and apply the following patch
42575584Sru(from Frank Wortner):
42618099Spst
42718099Spst*** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
42818099Spst--- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
42918099Spst***************
43018099Spst*** 489,495 ****
43118099Spst  .     \" make special case of shift out of italic
43218099Spst  .de }S
43318099Spst  .ds ]F
43418099Spst! .if \\$12 .if !\\$5 .ds ]F \^
43518099Spst  .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
43618099Spst  .el \\$3
43718099Spst  .}f
43818099Spst--- 489,495 ----
43918099Spst  .     \" make special case of shift out of italic
44018099Spst  .de }S
44118099Spst  .ds ]F
44218099Spst! .if \\$12 .if !\\$5 .ds ]F\^
44318099Spst  .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
44418099Spst  .el \\$3
44518099Spst  .}f
44618099Spst
44718099SpstAnother possible solution is to install tmac/man.ultrix as
44875584Sru/usr/local/share/groff/site-tmac/man.local.
44918099Spst
45069626Sru----------------------------------------------------------------------
45169626Sru
45218099Spst* I'm having problems formatting HP-UX 9.0 man pages with groff -man.
45318099Spst
45475584SruCopy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and
45575584Srueither put `.cp 1' at the beginning or filter it (and any files it .so's)
45675584Sruthrough tmac/fixmacros.sed.
45718099Spst
45869626Sru----------------------------------------------------------------------
45969626Sru
46075584Sru* On HP-UX, the compiler complains about missing symbol `alloca'.
46175584Sru
46275584SruSay
46375584Sru
46475584Sru  export LDFLAGS=-lPW
46575584Sru
46675584Srubefore starting the configure script.
46775584Sru
46875584Sru----------------------------------------------------------------------
46975584Sru
47018099Spst* I'm having problems formatting man pages produced by the perl
47169626Sru  wrapman script.
47218099Spst
47318099SpstSome versions of wrapman have a superfluous blank line before the .TH
47418099Spstline.  This must be deleted.  Then either use groff -C, or apply the
47518099Spstfollowing patch:
47618099Spst
47718099Spst*** wrapman.~2~	Sun Jan 19 12:10:24 1992
47818099Spst--- wrapman	Tue Aug 10 02:06:41 1993
47918099Spst***************
48018099Spst*** 35,41 ****
48118099Spst      $line1 .= <IN> if $line1 =~ /eval/;
48218099Spst      $line1 .= <IN> if $line1 =~ /argv/;
48318099Spst      $line2 = <IN>;
48418099Spst!     next if $line2 eq "'di';\n";
48518099Spst  
48618099Spst      # Pull the old switcheroo.
48718099Spst  
48818099Spst--- 35,41 ----
48918099Spst      $line1 .= <IN> if $line1 =~ /eval/;
49018099Spst      $line1 .= <IN> if $line1 =~ /argv/;
49118099Spst      $line2 = <IN>;
49218099Spst!     next if $line2 eq "'di ';\n" || $line2 eq "'di';\n";
49318099Spst  
49418099Spst      # Pull the old switcheroo.
49518099Spst  
49618099Spst***************
49718099Spst*** 49,56 ****
49818099Spst  
49918099Spst      print OUT $line1;
50018099Spst      print OUT <<EOF;
50118099Spst! 'di';
50218099Spst! 'ig00';
50318099Spst  #
50418099Spst  # $header
50518099Spst  #
50618099Spst--- 49,58 ----
50718099Spst  
50818099Spst      print OUT $line1;
50918099Spst      print OUT <<EOF;
51018099Spst! 'di ';
51118099Spst! 'ds 00 \\"';
51218099Spst! 'eo ';
51318099Spst! 'ig 00 ';
51418099Spst  #
51518099Spst  # $header
51618099Spst  #
51718099Spst***************
51818099Spst*** 72,85 ****
51918099Spst  
52018099Spst      # These next few lines are legal in both Perl and nroff.
52118099Spst  
52218099Spst! $null.00;                       # finish .ig
52318099Spst   
52418099Spst  'di           \\" finish diversion--previous line must be blank
52518099Spst  .nr nl 0-1    \\" fake up transition to first page again
52618099Spst  .nr % 0         \\" start at page 1
52718099Spst! '; __END__ ##### From here on it's a standard manual page #####
52818099Spst  .TH $PROG 1 "$month $mday, 19$year"
52918099Spst- .AT 3
53018099Spst  .SH NAME
53118099Spst  $prog \\- whatever
53218099Spst  .SH SYNOPSIS
53318099Spst--- 74,87 ----
53418099Spst  
53518099Spst      # These next few lines are legal in both Perl and nroff.
53618099Spst  
53718099Spst! $null.00 ;                      # finish .ig
53818099Spst! 'ec \\';
53918099Spst   
54018099Spst  'di           \\" finish diversion--previous line must be blank
54118099Spst  .nr nl 0-1    \\" fake up transition to first page again
54218099Spst  .nr % 0         \\" start at page 1
54318099Spst! .\\"'; __END__ ##### From here on it's a standard manual page #####
54418099Spst  .TH $PROG 1 "$month $mday, 19$year"
54518099Spst  .SH NAME
54618099Spst  $prog \\- whatever
54718099Spst  .SH SYNOPSIS
54818099Spst
54918099Spst
55069626Sru----------------------------------------------------------------------
55118099Spst
55269626Sru* When I preview documents using -TX75 or -TX100, the layout is not
55369626Sru  the same as when I print the document with -Tps: the line and page
55469626Sru  breaks come in different places.
55569626Sru
55618099SpstUse groff -X -Tps.
55718099Spst
55869626Sru----------------------------------------------------------------------
55969626Sru
56018099Spst* When I try to run gxditview, I get the error:
56169626Sru  Error: Widget viewport has zero width and/or height
56218099Spst
56318099SpstThis error means you haven't correctly installed the application
56418099Spstdefaults file, GXditview.ad; ``make install'' does this for you
56518099Spstautomatically, so either you didn't do ``make install'', or you don't
56618099Spsthave imake configured correctly.
56718099Spst
56869626Sru----------------------------------------------------------------------
56969626Sru
57018099Spst* groff uses up an enormous amount of memory processing large files.
57169626Sru  I'm using 386BSD 0.1.
57218099Spst
57318099Spst386BSD includes an old version of g++, 1.39, which has a bug that
57418099Spstcauses a major memory leak in gtroff.  Apply the following fix to g++
57518099Spstand recompile groff:
57618099Spst
57718099Spst*** cplus-decl.c.~1~	Mon Aug  6 05:28:59 1990
57818099Spst--- cplus-decl.c	Wed Jun  5 08:55:04 1991
57918099Spst***************
58018099Spst*** 7951,7961 ****
58118099Spst  
58218099Spst        /* At the end, call delete if that's what's requested.  */
58318099Spst        if (TREE_GETS_DELETE (current_class_type))
58418099Spst  	exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
58518099Spst  				      get_identifier (OPERATOR_DELETE_FORMAT),
58618099Spst! 				      build_tree_list (NULL_TREE, integer_zero_node),
58718099Spst  				      NULL_TREE, LOOKUP_NORMAL);
58818099Spst        else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
58918099Spst  	exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
59018099Spst        else
59118099Spst  	exprstmt = 0;
59218099Spst--- 7951,7961 ----
59318099Spst  
59418099Spst        /* At the end, call delete if that's what's requested.  */
59518099Spst        if (TREE_GETS_DELETE (current_class_type))
59618099Spst  	exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
59718099Spst  				      get_identifier (OPERATOR_DELETE_FORMAT),
59818099Spst! 				      build_tree_list (NULL_TREE, current_class_decl),
59918099Spst  				      NULL_TREE, LOOKUP_NORMAL);
60018099Spst        else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
60118099Spst  	exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
60218099Spst        else
60318099Spst  	exprstmt = 0;
60418099Spst
60569626Sru----------------------------------------------------------------------
60669626Sru
60718099Spst* Where can I get grap?
60818099Spst
60969626SruTed Faber <faber@lunabase.org> has written a freely available grap:
61018099Spst
61169626Sru  http://www.lunabase.org/~faber/Vault/software/grap/
61269626Sru
61369626Sru----------------------------------------------------------------------
61469626Sru
61518099Spst* How can I use groff with an old LaserJet printer that doesn't work
61669626Sru  with groff -Tlj4?
61718099Spst
61818099SpstYou have at least 3 options:
61918099Spst
62018099Spst- use groff -Tps with GNU Ghostscript;
62118099Spst
62218099Spst- use groff -Tdvi with a TeX .dvi to Laserjet driver;
62318099Spst
62418099Spst- use groff with the LaserJet driver in Chris Lewis' psroff package
62569626Sru  (available for ftp from:
62669626Sru  ftp.uunet.ca:/distrib/chris_lewis/psroff3.0pl17).
62718099Spst
62869626Sru----------------------------------------------------------------------
62969626Sru
63018099Spst* Groff seems to generate level 3 Postscript, but my printer is only a
63169626Sru  level 1 or 2 PostScript printer.
63218099Spst
63318099SpstIn fact groff generates only level 1 PostScript.  The `%!PS-Adobe-3.0'
63418099Spstcomment at the beginning of PostScript output generated by groff
63518099Spstindicates that the file conforms to version 3.0 of the Adobe Document
63618099SpstStructuring Conventions.  The output generated by groff should be
63718099Spstprintable on any PostScript printer.  Problems with groff output's not
63818099Spstprinting are most often caused by the spooling system.
63918099Spst
64069626Sru----------------------------------------------------------------------
64169626Sru
64218099Spst* The \n(st and \n(sb registers don't seem to work.  I thought \w set
64369626Sru  them to the height and depth of its argument, but the registers
64469626Sru  always seem to be 0.
64518099Spst
64618099Spst\n(st and \n(sb aren't supposed to give the height and depth of the
64718099Spststring rather they give the minimum and maximum vertical displacement
64818099Spstof the baseline.  For example for \v'2u'\v'-3u', \n(st will be 1 and
64918099Spst\n(sb will be -2.  The height and depth of the string is available in
65018099Spstthe \n[rst] and \n[rsb] registers: these are groff extensions.
65118099Spst
65269626Sru----------------------------------------------------------------------
65369626Sru
65418099Spst* On an SGI system, how can I make the man command use groff?
65518099Spst
65618099SpstFrom David Hinds <dhinds@allegro.stanford.edu> (some of these steps
65718099Spstare unnecessary if you install with the `g' Makefile variable defined
65818099Spstas empty):
65918099Spst
66018099SpstCreate a script called 'eqn':
66118099Spst
66218099Spst > #!/bin/sh
66318099Spst > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
66418099Spst > geqn $*
66518099Spst
66618099Spstand a script called 'neqn':
66718099Spst
66818099Spst > #!/bin/sh
66918099Spst > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
67018099Spst > geqn -Tascii $*
67118099Spst
67218099Spstand do:
67318099Spst
67418099Spst > ln -s gnroff nroff
67518099Spst
67618099Spstand edit the end of the gnroff script to be:
67718099Spst
67818099Spst > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
67918099Spst > exec groff -Wall -mtty-char $T $opts $rest
68018099Spst
68118099SpstTo get PostScript output from 'man -t', you also need to create a
68218099Spst'psroff' script similar to 'nroff'.  Here are the context diffs:
68318099Spst
68418099Spst*** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
68518099Spst--- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
68618099Spst***************
68718099Spst*** 1,8 ****
68818099Spst  #!/bin/sh
68918099Spst! # Emulate nroff with groff.
69018099Spst
69118099Spst  prog="$0"
69218099Spst! T=-Tascii
69318099Spst  opts=
69418099Spst
69518099Spst  for i
69618099Spst--- 1,8 ----
69718099Spst  #!/bin/sh
69818099Spst! # Emulate psroff with groff.
69918099Spst
70018099Spst  prog="$0"
70118099Spst! T=-Tps
70218099Spst  opts=
70318099Spst
70418099Spst  for i
70518099Spst***************
70618099Spst*** 25,30 ****
70718099Spst--- 25,33 ----
70818099Spst        -Tascii|-Tlatin1)
70918099Spst                T=$1
71018099Spst                ;;
71118099Spst+       -t)
71218099Spst+               # ignore -- default is send to stdout
71318099Spst+               ;;
71418099Spst        -T*)
71518099Spst                # ignore other devices
71618099Spst                ;;
71718099Spst***************
71818099Spst*** 49,53 ****
71918099Spst  rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
72018099Spst
72118099Spst  # This shell script is intended for use with man, so warnings are
72218099Spst  # probably not wanted.  Also load nroff-style character definitions.
72318099Spst! exec groff -Wall -mtty-char $T $opts $rest
72418099Spst--- 52,56 ----
72518099Spst  rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
72618099Spst
72718099Spst  # This shell script is intended for use with man, so warnings are
72818099Spst! # probably not wanted.
72918099Spst! exec groff -Wall $T $opts $rest
730