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: Tue, 29 Jun 2004 09:42:08 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

> With other words, only up to *six* arguments are allowed with `.B'.

OK, I systematically looked for all invocations of .R, .I, .B, .RI,
.RB, .BR, .BI, .IR, and .IB in groff man pages with more than six
arguments.  One command I used to find them was this:

grep -E -n -e '^['\''.][     ]*[RIB]{1,2}( +([^ \\"]|\\.|"([^"\\]|\\.)*")+){7}' 
$(find . -name '*.man' -print|sort)

Here is a patch to change them all to use no more than six arguments.

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

        * contrib/mm/groff_mm.man, man/ditroff.man, man/groff_font.man,
        man/groff_out.man, src/devices/grohtml/grohtml.man,
        src/preproc/grn/grn.man, src/preproc/pic/pic.man,
        tmac/groff_man.man, tmac/groff_ms.man:
        Don't pass more than six arguments to .R, .I, .B, etc., for
        compatibility with traditional troff macros.

===================================================================
RCS file: contrib/mm/groff_mm.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- 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 @@
 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
===================================================================
RCS file: man/ditroff.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- man/ditroff.man     2002/02/19 16:28:30     1.19.1.0
+++ man/ditroff.man     2004/06/29 16:27:05     1.19.1.1
@@ -85,7 +85,8 @@
 In order to distinguish it from Osanna's original mono-device version,
 it was called
 .I ditroff
-.RI ( d\/ evice\~ i\/ ndependent\~ troff\/ )
+.RI ( d\/ evice\~ i\/ ndependent\~ troff\/\c
+)
 on some systems, though this naming isn't mentioned in the classical
 documentation.
 .
===================================================================
RCS file: man/groff_font.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- man/groff_font.man  2004/02/03 22:00:54     1.19.1.0
+++ man/groff_font.man  2004/06/29 16:27:05     1.19.1.1
@@ -522,7 +522,8 @@
 readability):
 .
 .IP
-.IR width [\fB, height [\fB, depth [\fB, italic-correction
+.IR width [\fB, height [\fB, depth [\fB,\c
+.I italic-correction
 .br
 .RI [\fB, left-italic-correction [\fB, subscript-correction ]]]]]
 .
===================================================================
RCS file: man/groff_out.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.2
diff -u -r1.19.1.0 -r1.19.1.2
--- man/groff_out.man   2003/07/17 13:55:06     1.19.1.0
+++ man/groff_out.man   2004/06/29 16:27:05     1.19.1.2
@@ -1541,36 +1541,36 @@
 .
 .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 @@
 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
@@ -1714,8 +1714,10 @@
 .
 .RS
 .P
-.I The position after a graphic object has been drawn is at its end;
-.I for circles and ellipses, the "end" is at the right side.
+.ft I
+The position after a graphic object has been drawn is at its end;
+for circles and ellipses, the "end" is at the right side.
+.ft
 .RE
 .
 .P
===================================================================
RCS file: src/devices/grohtml/grohtml.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- src/devices/grohtml/grohtml.man     2003/07/07 05:22:48     1.19.1.0
+++ src/devices/grohtml/grohtml.man     2004/06/29 16:27:05     1.19.1.1
@@ -203,7 +203,8 @@
 .SH DEPENDENCIES
 .B grohtml
 is dependent upon the png utilities
-.RB ( \&\%pnmcut ,\  \%pnmcrop ,\  \%pnmtopng )
+.RB ( \&\%pnmcut ,\  \%pnmcrop ,\  \%pnmtopng\c
+)
 and GhostScript
 .RB ( gs ).
 .B \%pnmtopng
===================================================================
RCS file: src/preproc/grn/grn.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- src/preproc/grn/grn.man     2003/07/18 07:36:42     1.19.1.0
+++ src/preproc/grn/grn.man     2004/06/29 16:27:05     1.19.1.1
@@ -262,7 +262,8 @@
 Scale text to match the picture.
 Gremlin text is usually printed in the point size specified with the
 commands
-.BR 1 ,\  2 ,\  3 ,\ or\  4
+.BR 1 ,\  2 ,\  3 ,\ or\ \c
+.B 4
 regardless of any scaling factors in the picture.
 Setting
 .B pointscale
===================================================================
RCS file: src/preproc/pic/pic.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- src/preproc/pic/pic.man     2003/07/10 04:37:20     1.19.1.0
+++ src/preproc/pic/pic.man     2004/06/29 16:27:05     1.19.1.1
@@ -805,7 +805,8 @@
 sets the color of the outline,
 .B shaded
 the fill color, and
-.BR colo [ u ] r [ ed ]
+.BR colo [ u ] r [\c
+.BR ed ]
 sets both.
 All three keywords expect a suffix specifying the color, for example
 .RS
===================================================================
RCS file: tmac/groff_man.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- tmac/groff_man.man  2003/03/12 06:23:54     1.19.1.0
+++ tmac/groff_man.man  2004/06/29 16:27:05     1.19.1.1
@@ -183,7 +183,8 @@
 package.
 .
 .TP
-.BI .TH " title section " [ extra1 "] [" extra2 "] [" extra3 ]
+.BI .TH " title section " [ extra1 "] [" extra2\c
+.BI "] [" extra3 ]
 Set the title of the man page to
 .I title
 and the section to
===================================================================
RCS file: tmac/groff_ms.man,v
retrieving revision 1.19.1.0
retrieving revision 1.19.1.1
diff -u -r1.19.1.0 -r1.19.1.1
--- tmac/groff_ms.man   2003/07/18 07:45:10     1.19.1.0
+++ tmac/groff_ms.man   2004/06/29 16:27:05     1.19.1.1
@@ -361,7 +361,8 @@
 macros provide a variety of methods to highlight
 or emphasize text:
 .TP
-.BI "\&.B [" txt " [" post " [" pre ]]]
+.BI "\&.B [" txt " [" post " [" pre\c
+.B ]]]
 Sets its first argument in
 .BR "bold type" .
 If you specify a second argument,
@@ -389,27 +390,31 @@
 prints all text following in bold until
 the next highlighting, paragraph, or heading macro.
 .TP
-.BI "\&.R [" txt " [" post " [" pre ]]]
+.BI "\&.R [" txt " [" post " [" pre\c
+.B ]]]
 Sets its first argument in
 roman (or regular) type.
 It operates similarly to the
 .B B
 macro otherwise.
 .TP
-.BI "\&.I [" txt " [" post " [" pre ]]]
+.BI "\&.I [" txt " [" post " [" pre\c
+.B ]]]
 Sets its first argument in
 .IR "italic type" .
 It operates similarly to the
 .B B
 macro otherwise.
 .TP
-.BI "\&.CW [" txt " [" post " [" pre ]]]
+.BI "\&.CW [" txt " [" post " [" pre\c
+.B ]]]
 Sets its first argument in a constant width face.
 It operates similarly to the
 .B B
 macro otherwise.
 .TP
-.BI "\&.BI [" txt " [" post " [" pre ]]]
+.BI "\&.BI [" txt " [" post " [" pre\c
+.B ]]]
 Sets its first argument in bold italic type.
 It operates similarly to the
 .B B
@@ -758,7 +763,8 @@
 The syntax for these macros is as follows:
 .RS
 .IP
-.BI "\&.OH '" left ' center ' right '
+.BI "\&.OH '" left ' center ' right\c
+.B \&'
 .RE
 .IP
 You can replace the quote (') marks with any character not





reply via email to

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