bugGNU roff - Bugs: bug #54243, [PATCH] man pages: Fix issues with...

 
 

bug #54243: [PATCH] man pages: Fix issues with two-fonts macros

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Wed 04 Jul 2018 12:30:54 AM UTC
   
 
Category:  General Severity:  1 - Wish
Item Group:  Documentation Status:  Fixed
Privacy:  Public Assigned to:  schwarze
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Jun 2022 02:22:26 PM UTC, comment #2: 


commit 2e1db8d485db2ead9afadb831fc94d75740a4b34
Author: Ingo Schwarze <schwarze@openbsd.org>
Date:   Mon Aug 13 22:16:21 2018 +0200

    very minor tweaking of macro usage in some manual pages

     * prefer .B over .BI/.BR when there is only one argument
     * missing space before punctuation after .BR

    From Bjarni Ingi Gislason via Savannah bug #54243.


G. Branden Robinson <gbranden>
Group administrator
Mon 13 Aug 2018 08:26:15 PM UTC, comment #1: 

Pushed in commit 2e1db8d4 Aug 13 22:16:21 2018 +0200,
except that i dropped the patch to groff_hdtbl.7.man:

The CRI/XAA stuff is already totally over-engineered, and i'm not going to make it even worse.  Besides, using font alternating macros with only a single argument is not wrong, so there is no need for additional code just to avoid that.

Ingo Schwarze <schwarze>
Group Member
Wed 04 Jul 2018 12:30:54 AM UTC, original submission:  


From 5859ce68c8f6541cb8c9d4a9db1f51eebc821916 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Wed, 4 Jul 2018 00:11:48 +0000
Subject: [PATCH] man pages: Fix issues with two-fonts macros

Summary:

  Macro "XAA": Use the correct font macro according to the number of
arguments.

  Change a two-fonts macro to a single-font macro where a genuine
single argument is used.

  Change a single argument to two by splitting a punctuation mark from
the single one.

###

Details:

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

Input file is ././contrib/hdtbl/groff_hdtbl.7.man

<./contrib/hdtbl/groff_hdtbl.7.man>:611 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:686 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:894 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:1032 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:1049 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:1064 (macro CRI): only 1 argument, but more are expected
<./contrib/hdtbl/groff_hdtbl.7.man>:1099 (macro CRI): only 1 argument, but more are expected

####

Input file is ././src/devices/grolbp/grolbp.1.man

<./src/devices/grolbp/grolbp.1.man>:50 (macro BI): only 1 argument, but more are expected

####

Input file is ././src/devices/gropdf/gropdf.1.man

<./src/devices/gropdf/gropdf.1.man>:727 (macro BI): only 1 argument, but more are expected

####

Input file is ././src/preproc/preconv/preconv.1.man

<./src/preproc/preconv/preconv.1.man>:155 (macro BR): only 1 argument, but more are expected

####

Input file is ././src/roff/grog/grog.1.man

<./src/roff/grog/grog.1.man>:216 (macro BR): only 1 argument, but more are expected
<./src/roff/grog/grog.1.man>:217 (macro BR): only 1 argument, but more are expected

####

Input file is ././src/roff/troff/troff.1.man

<./src/roff/troff/troff.1.man>:294 (macro BR): only 1 argument, but more are expected

####

Input file is ././tmac/groff_man.7.man

<./tmac/groff_man.7.man>:438 (macro BR): only 1 argument, but more are expected
<./tmac/groff_man.7.man>:734 (macro BR): only 1 argument, but more are expected

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>

---
 contrib/hdtbl/groff_hdtbl.7.man   | 7 ++++++-
 src/devices/grolbp/grolbp.1.man   | 2 +-
 src/devices/gropdf/gropdf.1.man   | 2 +-
 src/preproc/preconv/preconv.1.man | 2 +-
 src/roff/grog/grog.1.man          | 4 ++--
 src/roff/troff/troff.1.man        | 3 +--
 tmac/groff_man.7.man              | 4 ++--
 7 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/contrib/hdtbl/groff_hdtbl.7.man b/contrib/hdtbl/groff_hdtbl.7.man
index 7c56bc93..bdb34773 100644
--- a/contrib/hdtbl/groff_hdtbl.7.man
+++ b/contrib/hdtbl/groff_hdtbl.7.man
@@ -129,7 +129,12 @@ groff_hdtbl \- Heidelberger table macros for GNU roff
 .
 .de XAA
 .  TQ
-.  CRI \\$@
+.  ie \\n[.$]>1 \{\
+.    CRI \\$@
+.  \}
+.  el \{\
+.    CR \\$1
+.  \}
 ..
 .
 .
diff --git a/src/devices/grolbp/grolbp.1.man b/src/devices/grolbp/grolbp.1.man
index f28429b7..c7ac405c 100644
--- a/src/devices/grolbp/grolbp.1.man
+++ b/src/devices/grolbp/grolbp.1.man
@@ -47,7 +47,7 @@ series laser printers)
 ] [\c
 .BI \-\-fontdir= font-directory\c
 ] [\c
-.BI \-\-landscape\c
+.BR \-\-landscape\c ""\" The macro B uses "itc"
 ] [\c
 .BI \-\-linewidth= width\c
 ] [\c
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index ad773688..c589ec5c 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -724,7 +724,7 @@ These commands are implemented with
 X commands:-
 .LP
 .TP
-.BI "\[rs]X'ps: exec %%%%PAUSE"
+.B "\[rs]X'ps: exec %%%%PAUSE"
 The section before this is treated as a block and is introduced using the
 current BLOCK transition setting (see \[oq]pdf: transition\[cq] below).
 This command
diff --git a/src/preproc/preconv/preconv.1.man b/src/preproc/preconv/preconv.1.man
index 7a085466..561072d2 100644
--- a/src/preproc/preconv/preconv.1.man
+++ b/src/preproc/preconv/preconv.1.man
@@ -152,7 +152,7 @@ If found, use it.
 .
 .IP 4
 Finally, if
-.BR uchardet
+.B uchardet
 library
 (an encoding detector library available on most major distributions)
 is available on the system, use it to try to detect the encoding of the file.
diff --git a/src/roff/grog/grog.1.man b/src/roff/grog/grog.1.man
index 6692b6de..4ff55683 100644
--- a/src/roff/grog/grog.1.man
+++ b/src/roff/grog/grog.1.man
@@ -213,8 +213,8 @@ options are required for running the input under
 .B \-t
 (preprocessors); and
 .BR \-man ,
-.BR \-mdoc,
-.BR \-mdoc\-old,
+.BR \-mdoc ,
+.BR \-mdoc\-old ,
 .BR \-me ,
 .BR \-mm ,
 .BR \-mom ,
diff --git a/src/roff/troff/troff.1.man b/src/roff/troff/troff.1.man
index 08537e88..44db3d72 100644
--- a/src/roff/troff/troff.1.man
+++ b/src/roff/troff/troff.1.man
@@ -290,8 +290,7 @@ To enable most useful warnings use
 .B \-w
 .BR all .
 To enable absolutely all warnings use
-.B \-w
-.BR w
+.B \-w w
 instead.
 Multiple
 .B \-w
diff --git a/tmac/groff_man.7.man b/tmac/groff_man.7.man
index de423913..cd8fa59a 100644
--- a/tmac/groff_man.7.man
+++ b/tmac/groff_man.7.man
@@ -435,7 +435,7 @@ font settings.
 .IP
 .B .TP
 was used to write the first paragraph of this description of
-.BR .TP,
+.BR .TP ,
 and
 .B .IP
 the subsequent ones.
@@ -731,7 +731,7 @@ To be certain your page will be portable to those systems, copy
 their definitions from the
 .I \%an\-ext.tmac
 file of a
-.BR groff
+.B groff
 installation.
 .
 .
--
2.18.0


Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by schwarze (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-15 gbranden CategoryNone General
    2018-08-13 schwarze Severity3 - Normal 1 - Wish
        StatusNone Fixed
        Assigned toNone schwarze
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.22.4

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code