home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / groff-1.09-src.lha / src / amiga / groff-1.09 / PROBLEMS < prev    next >
Text File  |  1994-02-11  |  18KB  |  545 lines

  1. This file describes various problems that have been encountered in
  2. compiling, installing and running groff.  Suggestions for additions or
  3. other improvements to this file are welcome.
  4.  
  5. * I get lots of `numeric overflow' error messages whenever I run
  6. groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler.
  7.  
  8. Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level
  9. Makefile.  If that doesn't solve the problem, define INT_MIN as
  10. -INT_MAX in libgroff/lib.h.
  11.  
  12. * I get errors when I try to compile groff with Sun C++.
  13.  
  14. Groff requires header files that are moderately compatible with AT&T
  15. C++ and ANSI C.  With some versions of Sun C++, the supplied header
  16. files need some of the following changes to meet this requirement:
  17. <string.h> must declare the mem* functions, (just add `#include
  18. <memory.h>' to <string.h>); the first argument to fopen and freopen
  19. should be declared as `const char *'; the first argument to fread
  20. should be declared as `void *'; the first argument to fwrite should be
  21. declared as `const void *'; malloc should be declared to return `void
  22. *'; in <alloca.h>, the declaration `extern "C" { void
  23. *__builtin_alloca(int); }' should be added; declarations of getopt(),
  24. optarg, optind and opterr should be added to <stdlib.h>; in
  25. <sys/signal.h> the return type and the second argument type of
  26. signal() should be changed to be `void (*)(int)'.
  27.  
  28. You can either change them in place, or copy them to some other
  29. directory and include that directory with a -I option.
  30.  
  31. * I get errors when I try to compile groff with DEC C++.
  32.  
  33. Fix the declaration of write() in <unistd.h> so that the second
  34. argument is a const char *.  Fix the declaration of open() in
  35. <sys/file.h> so that the first argument is a const char *.
  36.  
  37. * On Ultrix, the make stops with the message
  38.  
  39.   *** Error code 1
  40.  
  41.   Stop.
  42.  
  43. for no apparent reason.
  44.  
  45. Use GNU make.
  46.  
  47. * I'm having problems compiling groff on 386BSD 0.1.
  48.  
  49. If you're using ash as /bin/sh, you'll need the following patch.
  50.  
  51. *** gendef.sh.org    Sun Jun 30 13:30:36 1991
  52. --- gendef.sh    Sun Feb 28 10:23:49 1993
  53. ***************
  54. *** 3,9 ****
  55.   file=$1
  56.   shift
  57.   
  58. ! defs="#define $1"
  59.   shift
  60.   for def
  61.   do
  62. --- 3,10 ----
  63.   file=$1
  64.   shift
  65.   
  66. ! x=$1
  67. ! defs="#define $x"
  68.   shift
  69.   for def
  70.   do
  71.  
  72. You'll also need to change dirnamemax.c so that it doesn't use
  73. pathconf().
  74.  
  75. * While compiling on Xenix, ranlib libgroff.a fails.
  76.  
  77. The system ranlib can't handle externals longer than 40 characters.
  78. Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1
  79. instead.
  80.  
  81. * Groff can't handle my troff document. It works fine with AT&T troff.
  82.  
  83. Read the section on incompatibilities in gtroff(1).  Try using the -C
  84. option.  Alternatively there's the sed script in tmac/fixmacros.sed
  85. which will attempt to edit a file of macros so that it can be used
  86. with groff without the -C flag.
  87.  
  88. * groff -Tdvi produces dvi files that use fonts at weird magnifications.
  89.  
  90. Yes, it does.  You may need to compile fonts with Metafont at these
  91. magnifications. The CompileFonts script in the devdvi/generate
  92. directory may help you to do this. (It will take a *long* time.)
  93.  
  94. * pic output is not centered horizontally; pictures sometimes run off
  95. the bottom of the page.
  96.  
  97. The macro package you are using is not supplying appropriate definitions
  98. of PS and PE.  Give groff a -mpic option.
  99.  
  100. * I'm having problems including PostScript illustrations using the PSPIC
  101. macro.
  102.  
  103. A PostScript document must meet three requirements in order to be
  104. included with the PSPIC macro: it must comply with the Adobe Document
  105. Structuring Conventions; it must contain a BoundingBox line; it must
  106. be ``well-behaved''.  The BoundingBox line should be of the form:
  107.  
  108.   %%BoundingBox: llx lly urx ury
  109.  
  110. where llx, lly, urx, ury are the coordinates of the lower left x,
  111. lower left y, upper right x, upper right y of the bounding box of
  112. marks on the page expressed as integers in the default PostScript
  113. coordinate system (72 units per inch, origin at bottom left corner).
  114. A useful tactic is to print out the illustration by itself (you may
  115. need to add a `showpage' at the end), and physically measure the
  116. bounding box.  For more detail on these requirements, read the
  117. specification of Encapsulated PostScript format.  (This is available
  118. from the Adobe file server; send a message with a body of `help' to
  119. ps-file-server@adobe.com.)
  120.  
  121. * I've configured groff for A4 paper, but gtroff still seems to think
  122. that the length of a page (as returned by \n(.p) is 11 inches.
  123.  
  124. This is intentional.  The PAGE option is used only by grops.  For
  125. compatibility with ditroff, the default page length in gtroff is
  126. always 11 inches.  The page length can be changed with the `pl'
  127. request.
  128.  
  129. * Groff doesn't use the font names I'm used to.
  130.  
  131. Use the `ftr' request.  See gtroff(1).
  132.  
  133. * I get errors using the Unix -ms macros with groff -e -C.
  134.  
  135. Apply this change:
  136.  
  137. *** /usr/lib/ms/ms.eqn    Tue Apr 25 02:14:28 1989
  138. --- ms.eqn    Sun Nov 11 10:33:59 1990
  139. ***************
  140. *** 22,29 ****
  141.   ..
  142.   .    \" EN - end of a displayed equation
  143.   .de EN
  144. ! .if !\\*(10 .br
  145.   .di
  146.   .rm EZ
  147.   .nr ZN \\n(dn
  148.   .if \\n(ZN>0 .if \\n(YE=0 .LP
  149. --- 22,30 ----
  150.   ..
  151.   .    \" EN - end of a displayed equation
  152.   .de EN
  153. ! .if \\n(.k>0 .br
  154.   .di
  155. + .ds 10 \\*(EZ\\
  156.   .rm EZ
  157.   .nr ZN \\n(dn
  158.   .if \\n(ZN>0 .if \\n(YE=0 .LP
  159.  
  160.  
  161. * gpic doesn't accept the syntax `chop N M' for chopping both ends of a
  162. line.
  163.  
  164. The correct syntax is `chop N chop M'.
  165.  
  166. * With gpic -t, when I print `line ->; box' using a dvi to ps
  167. program, the arrow head sticks through into the inside of the box.
  168.  
  169. The dvi to ps program should be modified to set the line cap and
  170. line join parameters to 1 while printing tpic specials.
  171.  
  172. * When I print the output groff -Tps, the output is always shifted up
  173. by about 0.7 inches; I'm using 8.5x11 inch paper.
  174.  
  175. Make sure that PAGE is defined to be `letter' in the top-level
  176. Makefile.
  177.  
  178. * When I try to print the output of groff -Tps, I get no output at all
  179. from the printer, and the log file shows the error
  180. %%[ error: undefined; offendingcommand: BP ]%%
  181. I using TranScript spooling software.
  182.  
  183. This is a bug in the page reversal filter in early versions of
  184. TranScript.  Change the `broken' parameter in
  185. /usr/local/lib/groff/font/devps/DESC to 7.
  186.  
  187. * When I preview groff -Tps output using the Sun OpenWindows 2.0 pageview
  188. program, all the pages are displayed on top of each other.
  189.  
  190. This is a defect in pageview.  Change the `broken' parameter in
  191. /usr/local/lib/groff/font/devps/DESC to 2.
  192.  
  193. * With groff -TX75, -TX100or -X, I can only view the first page.
  194.  
  195. The left mouse button brings up a menu that allows you to view other
  196. pages.
  197.  
  198. * When I print the output of groff -Tdvi, I just get a black dot in
  199. upper left corner.
  200.  
  201. Some dvi drivers (notably early versions of xtex) do not correctly
  202. handle dvi files that use a resolution different from that used by dvi
  203. files produced by TeX.  Try getting a more up to date driver.
  204.  
  205. * I get lots of errors when I use groff with the AT&T -mm macros.
  206.  
  207. The AT&T -mm macros need a few changes to work with groff; `make
  208. install.dwbmm' will copy your -mm macros to groff's macro directory
  209. and make the necessary changes.  You may need to edit the commands for
  210. the install.mm target in the Makefile.  Alternatively use the groff
  211. -mm macros.
  212.  
  213. * gtroff doesn't understand lines like `.ce99' with no space between
  214. the name of the request or macro and the arguments.
  215.  
  216. Gtroff requires a space between macro or request and its arguments
  217. because it allows the use of long names for macros and requests.  You
  218. can use the -C option or the `cp' request to put gtroff into a
  219. compatibility mode in which it is not possible to use long names for
  220. macros but in which no space is required between macros and their
  221. arguments.  The use of compatibility mode is strongly discouraged.
  222.  
  223. * gtroff gives warnings about lines like
  224.   .ev    \" a comment
  225. (with a tab after the .ev).
  226.  
  227. A tab character cannot be used as a substitute for a space character
  228. (except in one case: between a control character at the beginning of a
  229. line and the name of a macro or request).  For example, in Unix troff
  230.   .ps    \" restore the previous point size
  231. (with a tab after the .ps) will NOT restore the previous point-size;
  232. instead it will be silently ignored.  Since this is very likely to be
  233. an error, gtroff can give a warning about it.  If you want to align
  234. comments, you can do it like this:
  235.   .ev\"                \" a comment
  236.  
  237. * I don't like the page headers and footers produced by groff -man.
  238.  
  239. There seem to be many different styles of page header and footer
  240. produced by different versions of the -man macros.  You will need to
  241. modify macros/tmac.an to suit your personal taste.  For example, if
  242. you want the center of the page header to say
  243.   UNIX Programmer's Manual
  244. you will need to change the line
  245.   .el .ds an-extra3 \"UNIX Programmer's Manual
  246. to
  247.   .el .ds an-extra3 UNIX Programmer's Manual
  248.  
  249. * While formatting a manual page, groff complains about not being able to
  250. break lines.  The problem seems to be caused by a line like:
  251.   .TP \w'label'+2
  252.  
  253. The -man documentation says that the default scale indicator for TP
  254. macro is `n'.  The groff -man macros implement this correctly, so that
  255. the argument will be evaluated as if it were
  256.   \w'label'n+2n
  257. The Unix -man macros don't implement this correctly (probably because
  258. it's hard to do in Unix troff); they just append `n' to the entire
  259. argument, so that it will be evaluated as if it were
  260.   \w'label'u+2n
  261. The solution is to fix the manual page:
  262.   .TP \w'label'u+2
  263.  
  264. * I'm having problems formatting Ultrix man pages with groff -man.
  265.  
  266. The Ultrix man pages use a number of non-standard extensions to the
  267. Unix man macros.  One solution is to use the Ultrix -man macros with
  268. groff.  Rename /usr/local/lib/groff/tmac/tmac.an to
  269. /usr/local/lib/groff/tmac/tmac.an.gnu, copy /usr/lib/tmac/tmac.an to
  270. /usr/local/lib/groff/tmac/tmac.an and apply the following patch (from
  271. Frank Wortner):
  272.  
  273. *** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
  274. --- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
  275. ***************
  276. *** 489,495 ****
  277.   .     \" make special case of shift out of italic
  278.   .de }S
  279.   .ds ]F
  280. ! .if \\$12 .if !\\$5 .ds ]F \^
  281.   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  282.   .el \\$3
  283.   .}f
  284. --- 489,495 ----
  285.   .     \" make special case of shift out of italic
  286.   .de }S
  287.   .ds ]F
  288. ! .if \\$12 .if !\\$5 .ds ]F\^
  289.   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
  290.   .el \\$3
  291.   .}f
  292.  
  293. Another possible solution is to install tmac/man.ultrix as
  294. /usr/local/lib/groff/tmac/man.local.
  295.  
  296. * I'm having problems formatting HP-UX 9.0 man pages with groff -man.
  297.  
  298. Rename /usr/local/lib/groff/tmac/tmac.an to (for example)
  299. /usr/local/lib/groff/tmac/tmac.gan, copy HP's tmac.an into
  300. /usr/local/lib/groff/tmac/tmac.an, and either put `.cp 1' at the
  301. beginning or filter it (and any files it .so's) through
  302. tmac/fixmacros.sed.
  303.  
  304. * I'm having problems formatting man pages produced by the perl
  305. wrapman script.
  306.  
  307. Some versions of wrapman have a superfluous blank line before the .TH
  308. line.  This must be deleted.  Then either use groff -C, or apply the
  309. following patch:
  310.  
  311. *** wrapman.~2~    Sun Jan 19 12:10:24 1992
  312. --- wrapman    Fri Apr  2 12:12:57 1993
  313. ***************
  314. *** 35,41 ****
  315.       $line1 .= <IN> if $line1 =~ /eval/;
  316.       $line1 .= <IN> if $line1 =~ /argv/;
  317.       $line2 = <IN>;
  318. !     next if $line2 eq "'di';\n";
  319.   
  320.       # Pull the old switcheroo.
  321.   
  322. --- 35,41 ----
  323.       $line1 .= <IN> if $line1 =~ /eval/;
  324.       $line1 .= <IN> if $line1 =~ /argv/;
  325.       $line2 = <IN>;
  326. !     next if $line2 eq "'di ';\n";
  327.   
  328.       # Pull the old switcheroo.
  329.   
  330. ***************
  331. *** 49,56 ****
  332.   
  333.       print OUT $line1;
  334.       print OUT <<EOF;
  335. ! 'di';
  336. ! 'ig00';
  337.   #
  338.   # $header
  339.   #
  340. --- 49,57 ----
  341.   
  342.       print OUT $line1;
  343.       print OUT <<EOF;
  344. ! 'di ';
  345. ! 'ds 00 \\"';
  346. ! 'ig 00 ';
  347.   #
  348.   # $header
  349.   #
  350. ***************
  351. *** 72,85 ****
  352.   
  353.       # These next few lines are legal in both Perl and nroff.
  354.   
  355. ! $null.00;                       # finish .ig
  356.    
  357.   'di           \\" finish diversion--previous line must be blank
  358.   .nr nl 0-1    \\" fake up transition to first page again
  359.   .nr % 0         \\" start at page 1
  360. ! '; __END__ ##### From here on it's a standard manual page #####
  361.   .TH $PROG 1 "$month $mday, 19$year"
  362. - .AT 3
  363.   .SH NAME
  364.   $prog \\- whatever
  365.   .SH SYNOPSIS
  366. --- 73,85 ----
  367.   
  368.       # These next few lines are legal in both Perl and nroff.
  369.   
  370. ! $null.00 ;                      # finish .ig
  371.    
  372.   'di           \\" finish diversion--previous line must be blank
  373.   .nr nl 0-1    \\" fake up transition to first page again
  374.   .nr % 0         \\" start at page 1
  375. ! .\\"'; __END__ ##### From here on it's a standard manual page #####
  376.   .TH $PROG 1 "$month $mday, 19$year"
  377.   .SH NAME
  378.   $prog \\- whatever
  379.   .SH SYNOPSIS
  380.  
  381.  
  382. * When I preview documents using -TX75 or -TX100, the layout is not the same
  383. as when I print the document with -Tps: the line and page breaks come
  384. in different places.
  385.  
  386. Use groff -X -Tps.
  387.  
  388. * When I try to run gxditview, I get the error:
  389. Error: Widget viewport has zero width and/or height
  390.  
  391. This error means you haven't correctly installed the application
  392. defaults file, GXditview.ad; ``make install'' does this for you
  393. automatically, so either you didn't do ``make install'', or you don't
  394. have imake configured correctly.
  395.  
  396. * groff uses up an enormous amount of memory processing large files.
  397. I'm using 386BSD 0.1.
  398.  
  399. 386BSD includes an old version of g++, 1.39, which has a bug that
  400. causes a major memory leak in gtroff.  Apply the following fix to g++
  401. and recompile groff:
  402.  
  403. *** cplus-decl.c.~1~    Mon Aug  6 05:28:59 1990
  404. --- cplus-decl.c    Wed Jun  5 08:55:04 1991
  405. ***************
  406. *** 7951,7961 ****
  407.   
  408.         /* At the end, call delete if that's what's requested.  */
  409.         if (TREE_GETS_DELETE (current_class_type))
  410.       exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
  411.                         get_identifier (OPERATOR_DELETE_FORMAT),
  412. !                       build_tree_list (NULL_TREE, integer_zero_node),
  413.                         NULL_TREE, LOOKUP_NORMAL);
  414.         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
  415.       exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
  416.         else
  417.       exprstmt = 0;
  418. --- 7951,7961 ----
  419.   
  420.         /* At the end, call delete if that's what's requested.  */
  421.         if (TREE_GETS_DELETE (current_class_type))
  422.       exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
  423.                         get_identifier (OPERATOR_DELETE_FORMAT),
  424. !                       build_tree_list (NULL_TREE, current_class_decl),
  425.                         NULL_TREE, LOOKUP_NORMAL);
  426.         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
  427.       exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
  428.         else
  429.       exprstmt = 0;
  430.  
  431. * Where can I get grap?
  432.  
  433. Grap is not freely available, but there is a nawk script implementing
  434. an extended subset of grap available for ftp as
  435. ftp.informatik.uni-rostock.de:/pub/local/software/prag-1.0.shar.gz.
  436.  
  437. * How can I use groff with a Laserjet printer?
  438.  
  439. You have at least 3 options:
  440.  
  441. - use groff -Tps with GNU Ghostscript;
  442.  
  443. - use groff -Tdvi with a TeX .dvi to Laserjet driver;
  444.  
  445. - use groff with the Laserjet driver in Chris Lewis' psroff package
  446. (available for ftp from:
  447. ftp.uunet.ca:/distrib/chris_lewis/psroff3.0pl17).
  448.  
  449. * Groff seems to generate level 3 Postscript, but my printer is only a
  450. level 1 or 2 PostScript printer.
  451.  
  452. In fact groff generates only level 1 PostScript.  The `%!PS-Adobe-3.0'
  453. comment at the beginning of PostScript output generated by groff
  454. indicates that the file conforms to version 3.0 of the Adobe Document
  455. Structuring Conventions.  The output generated by groff should be
  456. printable on any PostScript printer.  Problems with groff output's not
  457. printing are most often caused by the spooling system.
  458.  
  459. * The \n(st and \n(sb registers don't seem to work.  I thought \w set
  460. them to the height and depth of its argument, but the registers always
  461. seem to be 0.
  462.  
  463. \n(st and \n(sb aren't supposed to give the height and depth of the
  464. string rather they give the minimum and maximum vertical displacement
  465. of the baseline.  For example for \v'2u'\v'-3u', \n(st will be 1 and
  466. \n(sb will be -2.  The height and depth of the string is available in
  467. the \n[rst] and \n[rsb] registers: these are groff extensions.
  468.  
  469. * On an SGI system, how can I make the man command use groff?
  470.  
  471. From David Hinds <dhinds@allegro.stanford.edu> (some of these steps
  472. are unnecessary if you install with the `g' Makefile variable defined
  473. as empty):
  474.  
  475. Create a script called 'eqn':
  476.  
  477.  > #!/bin/sh
  478.  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
  479.  > geqn $*
  480.  
  481. and a script called 'neqn':
  482.  
  483.  > #!/bin/sh
  484.  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
  485.  > geqn -Tascii $*
  486.  
  487. and do:
  488.  
  489.  > ln -s gnroff nroff
  490.  
  491. and edit the end of the gnroff script to be:
  492.  
  493.  > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  494.  > exec groff -Wall -mtty-char $T $opts $rest
  495.  
  496. To get PostScript output from 'man -t', you also need to create a
  497. 'psroff' script similar to 'nroff'.  Here are the context diffs:
  498.  
  499. *** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
  500. --- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
  501. ***************
  502. *** 1,8 ****
  503.   #!/bin/sh
  504. ! # Emulate nroff with groff.
  505.  
  506.   prog="$0"
  507. ! T=-Tascii
  508.   opts=
  509.  
  510.   for i
  511. --- 1,8 ----
  512.   #!/bin/sh
  513. ! # Emulate psroff with groff.
  514.  
  515.   prog="$0"
  516. ! T=-Tps
  517.   opts=
  518.  
  519.   for i
  520. ***************
  521. *** 25,30 ****
  522. --- 25,33 ----
  523.         -Tascii|-Tlatin1)
  524.                 T=$1
  525.                 ;;
  526. +       -t)
  527. +               # ignore -- default is send to stdout
  528. +               ;;
  529.         -T*)
  530.                 # ignore other devices
  531.                 ;;
  532. ***************
  533. *** 49,53 ****
  534.   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  535.  
  536.   # This shell script is intended for use with man, so warnings are
  537.   # probably not wanted.  Also load nroff-style character definitions.
  538. ! exec groff -Wall -mtty-char $T $opts $rest
  539. --- 52,56 ----
  540.   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  541.  
  542.   # This shell script is intended for use with man, so warnings are
  543. ! # probably not wanted.
  544. ! exec groff -Wall $T $opts $rest
  545.