bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: groff 1.19.1 complains when formatting its own man pages


From: Paul Eggert
Subject: Re: groff 1.19.1 complains when formatting its own man pages
Date: Mon, 28 Jun 2004 13:23:06 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

> In UNIX troff versions of the man macros, the definition of, say,
> `.B' could look like this:[*]
>
>   .de B
>   \fB\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9\fP
>   ..
>
> With groff you aren't limited to nine arguments:
>
>   .B This is a long text with many arguments written in boldface.
>
> So while we can probably fix the syntactical obstacles, we can't fix
> the way UNIX troff macros are programmed.

True, but we don't have to fix these Unix troff macro problems in
general; we need merely to ensure (1) that portable uses of these
macros work (so that we can format random macro pages supplied by
other packages) and (2) that groff's own man pages don't run afoul of
these problems.  I looked for instances of the problem that you
mentioned above, and found only 2 files (which I propose fixes for
below).

I don't recall all the ins and outs here, but perhaps another
possibility is to have groff's macro pages include a copy of groff's
-man macros; this should override the system -man macros and avoid
the problem as well.

I did think of one problem with my suggestion: one couldn't define a
macro to turn off compatibility mode.

2004-06-28  Paul Eggert  <address@hidden>

        * contrib/mm/groff_mm.man, man/groff_out.man: Don't pass more than
        9 arguments to a standard macro, for the benefit of old systems
        whose macros are interpreted in compatibility mode.

--- contrib/mm/groff_mm.man     2004/05/13 13:13:24     1.19.1.0
+++ contrib/mm/groff_mm.man     2004/06/28 20:17:15     1.19.1.1
@@ -1278,7 +1278,7 @@ the header in letters or other special t
 This macro must be used before any text to inhibit the pageheader
 on the first page.
 .TP
-.B PIC [-L] [-C] [-R] [-I n] filename [width [height]]
+.B "PIC [-L] [-C] [-R] [-I n] filename [width [height]]"
 \fBPIC\fP includes a Postscript file in the document.
 The macro depends on \fBmmroff\fP and \fBINITR\fP.
 \fB-L\fP, \fB-C\fP, \fB-R\fP and \fB-I n\fP adjusts the picture
--- man/groff_out.man   2003/07/17 13:55:06     1.19.1.0
+++ man/groff_out.man   2004/06/28 20:17:15     1.19.1.1
@@ -1541,36 +1541,36 @@ formatter.
 .
 .P
 .nf
-.I # prologue
+.I "# prologue"
 .ft CB
 x T latin1
 x res 240 24 40
 x init
-.I # begin a new page
+.I "# begin a new page"
 .ft CB
 p1
-.I # font setup
+.I "# font setup"
 .ft CB
 x font 1 R
 f1
 s10
-.I # initial positioning on the page
+.I "# initial positioning on the page"
 .ft CB
 V40
 H0
-.I # write text `hell'
+.I "# write text `hell'"
 .ft CB
 thell
-.I # inform about a space, and do it by a horizontal jump
+.I "# inform about a space, and do it by a horizontal jump"
 .ft CB
 wh24
-.I # write text `world'
+.I "# write text `world'"
 .ft CB
 tworld
-.I # announce line break, but do nothing because ...
+.I "# announce line break, but do nothing because ..."
 .ft CB
 n40 0
-.I # ... the end of the document has been reached
+.I "# ... the end of the document has been reached"
 .ft CB
 x trailer
 V2640
@@ -1610,7 +1610,7 @@ f5
 s10
 V16
 H100
-.I # write text with old-style jump-and-write command
+.I "# write text with old-style jump-and-write command"
 .ft CB
 ch07e07l03lw06w11o07r05l03dh7
 n16 0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]