groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/16: [man pages]: Fix style macro and \c usage with TP.


From: G. Branden Robinson
Subject: [groff] 03/16: [man pages]: Fix style macro and \c usage with TP.
Date: Thu, 9 Jun 2022 23:59:13 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit aa5875e66de6d5fa1a931b9f95469ec44955eb49
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jun 8 01:27:30 2022 -0500

    [man pages]: Fix style macro and \c usage with TP.
    
    The fix for Savannah #51468 means that use of single-font macros like
    `B` and `I` no longer works correctly when they appear terminated with a
    `\c` escape sequence in a `TP` paragraph tag.  Recast to use two-font
    macros, which have no such difficulty.
    
    * contrib/chem/chem.1.man:
    * contrib/mm/groff_mm.7.man:
    * man/groff_char.7.man:
    * man/groff_diff.7.man:
    * man/groff_tmac.5.man:
    * src/devices/grolj4/grolj4.1.man:
    * src/devices/gropdf/gropdf.1.man:
    * src/preproc/eqn/eqn.1.man:
    * src/preproc/pic/pic.1.man: Stop using single-font macros with `\c` in
      paragraph tags.
    
    Also:
    * man/groff_char.7.man: Make a wrongly bold closing bracket roman.
---
 contrib/chem/chem.1.man         |  4 +--
 contrib/mm/groff_mm.7.man       | 34 ++++++++++++-------------
 man/groff_char.7.man            |  6 ++---
 man/groff_diff.7.man            | 14 +++++------
 man/groff_tmac.5.man            | 13 +++-------
 src/devices/grolj4/grolj4.1.man |  4 +--
 src/devices/gropdf/gropdf.1.man | 12 ++++-----
 src/preproc/eqn/eqn.1.man       | 36 ++++++++------------------
 src/preproc/pic/pic.1.man       |  4 +--
 tmac/groff_ms.7.man             | 56 ++++++++++++++++++++---------------------
 10 files changed, 81 insertions(+), 102 deletions(-)

diff --git a/contrib/chem/chem.1.man b/contrib/chem/chem.1.man
index 438a80c6..c95e5377 100644
--- a/contrib/chem/chem.1.man
+++ b/contrib/chem/chem.1.man
@@ -635,9 +635,7 @@ only letters and numbers is valid:
 The specific construction
 .RS
 .TP
-.B bond\~\c
-\&.\|.\|.\&\~\c
-.B ; moiety
+.BR bond \~.\|.\|.\&\~ "; moiety"
 .RE
 .P
 is equivalent to
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 236a9d31..63e867b3 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -479,8 +479,8 @@ This is used when diagrams or other non-formatted documents 
are
 included as appendices.
 .
 .TP
-.B AS\~\c
-.RI [ arg \~[ indent ]]
+.BR AS\~ [\c
+.IR arg \~[ indent ]]
 Abstract start.
 .
 Depending on the cover sheet macros used,
@@ -556,8 +556,8 @@ Default is \[lq]ABSTRACT\[rq].
 Sets the text above the abstract text.
 .
 .TP
-.B AT\~\c
-.IR title \~[.\|.\|.]
+.BI AT\~ title\c
+\~[.\|.\|.]
 Author's title(s).
 .
 If present,
@@ -572,7 +572,7 @@ cover sheet style.
 .
 .
 .TP
-.B AU\~\c
+.BR AU \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ name\~\c
 .RI [ initials\~\c
 .RI [ loc\~\c
@@ -620,7 +620,7 @@ Generates a line with place for signature.
 .
 .
 .TP
-.B B\~\c
+.BR B \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ bold-text\~\c
 .RI [ previous-font-text ]]\~.\|.\|.
 Join
@@ -656,7 +656,7 @@ End bottom block, see
 .
 .
 .TP
-.B BI\~\c
+.BR BI \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ bold-text\~\c
 .RI [ italic-text ]]\~.\|.\|.
 Join
@@ -683,7 +683,7 @@ A third argument prohibits printing of a blank line before 
each item.
 .
 .
 .TP
-.B BR\~\c
+.BR BR \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ bold-text\~\c
 .RI [ roman-text ]]\~.\|.\|.
 Join
@@ -724,7 +724,7 @@ A third argument prohibits printing of a blank line before 
each item.
 .
 .
 .TP
-.B COVER\~\c
+.BR COVER \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ style ]
 Begin a cover sheet description.
 .
@@ -1837,7 +1837,7 @@ See\~\c
 .
 .
 .TP
-.B I\~\c
+.BR I \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ italic-text\~\c
 .RI [ previous-font-text ]]\~.\|.\|.
 Join
@@ -1865,7 +1865,7 @@ See
 .
 .
 .TP
-.B IB\~\c
+.BR IB \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ italic-text\~\c
 .RI [ bold-text ]]\~.\|.\|.
 Join
@@ -2007,7 +2007,7 @@ normal operation again.
 .
 .
 .TP
-.B IR\~\c
+.BR IR \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ italic-text\~\c
 .RI [ roman-text ]]\~.\|.\|.
 Join
@@ -2377,7 +2377,7 @@ A third argument prohibits printing of a blank line 
before each item.
 .
 .
 .TP
-.B MT\~\c
+.BR MT \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ number \~[ addressee ]]
 Memorandum type.
 .
@@ -2442,7 +2442,7 @@ without arguments to return to normal.
 .
 .
 .TP
-.B MULB\~\c
+.BR MULB \~\c \" space in roman because we must use 2-font macro with \c
 .IR "cw1 space1\~" [ "cw2 space2" "] .\|.\|.\~" cwn
 Begin alternative multi-column mode.
 .
@@ -2746,7 +2746,7 @@ mode.
 .
 .
 .TP
-.B R\~\c
+.BR R \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ roman-text\~\c
 .RI [ previous-font-text ]]\~.\|.\|.
 Join
@@ -2761,7 +2761,7 @@ switch font to roman style.
 .
 .
 .TP
-.B RB\~\c
+.BR RB \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ roman-text\~\c
 .RI [ bold-text ]]\~.\|.\|.
 Join
@@ -2802,7 +2802,7 @@ See
 .
 .
 .TP
-.B RI\~\c
+.BR RI \~\c \" space in roman because we must use 2-font macro with \c
 .RI [ roman-text\~\c
 .RI [ italic-text ]]\~.\|.\|.
 Join
diff --git a/man/groff_char.7.man b/man/groff_char.7.man
index e67e052d..9d863104 100644
--- a/man/groff_char.7.man
+++ b/man/groff_char.7.man
@@ -785,9 +785,9 @@ on ISO Latin-1 systems.)
 .
 .TP
 .BI \[rs][u base-glyph\c
-.RB [ _\c
-.I combining-component\c
-.RB ].\|.\|. ]
+[\c
+.BI _ combining-component\c
+].\|.\|.]
 constructs a composite glyph from Unicode numeric special character
 escape sequences.
 .
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 0efac0d7..09c968ae 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -1876,8 +1876,8 @@ incompatibilities caused by long names do not arise.
 .
 .
 .TP
-.B .defcolor\~\c
-.IR "ident scheme color-component\~" .\|.\|.
+.BI .defcolor\~ "ident scheme color-component\~\c"
+\&.\|.\|.
 Define a color named
 .I ident.
 .
@@ -3150,8 +3150,8 @@ are special and are searched for glyphs not in the 
current font.
 Without arguments, reset the list of special fonts to be empty.
 .
 .TP
-.B .spreadwarn\c
-.RI " [" limit ]
+.BR .spreadwarn\~ [\c
+.IR limit ]
 Emit a
 .B break
 warning if the additional space inserted for each space between words in
@@ -3514,8 +3514,8 @@ vertical position traps are enabled.
 .
 .
 .TP
-.B .warn\~\c
-.RI [ n ]
+.BR .warn\~ [\c
+.IR n ]
 Select the categories,
 or \[lq]types\[rq],
 of reported warnings.
@@ -3742,7 +3742,7 @@ and default to\~12.
 .TP
 .BR .ta\~ [[\c
 .IR "n1 n2\~" .\|.\|.\~ nn \~]\c
-.B T\~\c
+.BR T \~\c \" space in roman because we must use 2-font macro with \c
 .IR "r1 r2\~" .\|.\|.\~ rn ]
 .I groff
 supports an extended syntax to specify repeating tab stops after
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 12eb8450..3e231af3 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -786,15 +786,10 @@ documents can draw colored rectangles beneath any output.
 .
 .RS
 .TP
-.B \%.BOXSTART \c
-.B \%SHADED \c
-.I color \c
-.B \%OUTLINED \c
-.I color \c
-.B \%INDENT \c
-.I size \c
-.B \%WEIGHT \c
-.I size
+.BI \%.BOXSTART\~SHADED\~ color\~\c
+.BI \%OUTLINED\~ color\~\c
+.BI \%INDENT\~ size\~\c
+.BI \%WEIGHT\~ size
 begins a box,
 where the argument after
 .B \%SHADED
diff --git a/src/devices/grolj4/grolj4.1.man b/src/devices/grolj4/grolj4.1.man
index 5103711e..f96f1818 100644
--- a/src/devices/grolj4/grolj4.1.man
+++ b/src/devices/grolj4/grolj4.1.man
@@ -149,8 +149,8 @@ Print the document with a landscape orientation.
 .
 .
 .TP
-.B \-d\c
-.RI " [" n ]
+.BR \-d \~[\c
+.IR n ]
 Use duplex mode
 .IR n :
 1\ is long-side binding; 2\ is short-side binding;
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index ec643f95..ff31d1a5 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -204,8 +204,8 @@ complains about this line if it is included, but works 
anyway.
 .
 .
 .TP
-.B \-u\c
-.RI " [" cmapfile ]
+.BR \-u \~[\c
+.IR cmapfile ]
 .B Gropdf
 normally includes a ToUnicode CMap with any font created using
 .I text.enc
@@ -822,8 +822,8 @@ tags.
 The following tags are supported:
 .
 .TP
-.B \[rs]X\[aq]pdf: pdfpic\~\c
-.IR "file alignment width height line-length" \[aq]
+.BI "\[rs]X\[aq]pdf: pdfpic\~" file\~\c
+.IR "alignment width height line-length" \[aq]
 Place an image of the specified
 .I width
 containing the PDF drawing from file
@@ -952,8 +952,8 @@ document,
 but more esoteric uses are possible.
 .
 .TP
-.B \[rs]X\[aq]pdf: transition\~\c
-.IB "feature mode duration dimension motion direction scale bool" \[aq]
+.BI \[rs]X\[aq]pdf:\~transition\~ feature\~\c
+.IB "mode duration dimension motion direction scale bool" \[aq]
 where
 .IP
 .I feature
diff --git a/src/preproc/eqn/eqn.1.man b/src/preproc/eqn/eqn.1.man
index 70ea7a60..bc6a6750 100644
--- a/src/preproc/eqn/eqn.1.man
+++ b/src/preproc/eqn/eqn.1.man
@@ -358,9 +358,7 @@ the expression uses
 .
 .
 .TP
-.I e1 \c
-.B smallover \c
-.I e2
+.IB e1 \~smallover\~ e2
 This is similar to
 .BR over ;
 .B smallover
@@ -412,9 +410,7 @@ is silently ignored when generating MathML.
 .
 .
 .TP
-.I e1 \c
-.B accent \c
-.I e2
+.IB e1 \~accent\~ e2
 This sets
 .I e2
 as an accent over
@@ -452,9 +448,7 @@ primitive.
 .
 .
 .TP
-.I e1 \c
-.B uaccent \c
-.I e2
+.IB e1 \~uaccent\~ e2
 This sets
 .I e2
 as an accent under
@@ -693,36 +687,28 @@ picture.
 .\" ====================================================================
 .
 .TP
-.B col \c
-.I n \c
+.BI col\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B ccol \c
-.I n \c
+.BI ccol\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B lcol \c
-.I n \c
+.BI lcol\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B rcol \c
-.I n \c
+.BI rcol\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B pile \c
-.I n \c
+.BI pile\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B cpile \c
-.I n \c
+.BI cpile\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B lpile \c
-.I n \c
+.BI lpile\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 .TQ
-.B rpile \c
-.I n \c
+.BI rpile\~ n\~\c
 .BR {\~ .\|.\|.\& \~}
 The integer
 .RI value\~ n
diff --git a/src/preproc/pic/pic.1.man b/src/preproc/pic/pic.1.man
index cbddb290..fd02d6df 100644
--- a/src/preproc/pic/pic.1.man
+++ b/src/preproc/pic/pic.1.man
@@ -571,7 +571,7 @@ at this point in the file.
 .BR copy\~ [ \[dq]\c
 .IB filename \[dq]\c
 .RB ]\~ thru\~\c
-.I X body X\~\c
+.IR "X body X" \~\c \" space in roman: we must use 2-font macro with \c
 .RB [ until\~ \[dq]\c
 .IB word \[dq]\c
 ]
@@ -579,7 +579,7 @@ at this point in the file.
 .BR copy\~ [ \[dq]\c
 .IB filename \[dq]\c
 .RB ]\~ thru\~\c
-.I macro\~\c
+.IR macro \~\c \" space roman because we must use 2-font macro with \c
 .RB [ until\~ \[dq]\c
 .IB word \[dq]\c
 ]
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index e1497fa6..4faf5e99 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -547,8 +547,8 @@ or heading or paragraphing macro call.
 .
 .
 .TP
-.B .DA\c
-.RI "\~[" x "\~.\|.\|.]"
+.BR .DA \~[\c
+.IR x \~.\|.\|.]
 Typeset the current date,
 or any
 .RI arguments\~ x ,
@@ -562,8 +562,8 @@ page.
 .
 .
 .TP
-.B .ND\c
-.RI "\~[" x "\~.\|.\|.]"
+.BR .ND \~[\c
+.IR x \~.\|.\|.]
 Typeset the current date,
 or any
 .RI arguments\~ x ,
@@ -726,8 +726,8 @@ register.
 .
 .
 .TP
-.B .IP\c
-.RI \~[ marker \~[ width ]]
+.BR .IP \~[\c
+.IR marker \~[ width ]]
 Set a paragraph with a left indentation.
 .
 The optional
@@ -806,8 +806,8 @@ rendered on the same output line in the same style.
 .
 .
 .TP
-.B .NH\c
-.RI \~[ depth ]
+.BR .NH \~[\c
+.IR depth ]
 Set an automatically numbered heading.
 .
 .I ms
@@ -905,8 +905,8 @@ table of contents entries.
 .
 .
 .TP
-.B .SH\c
-.RI \~[ depth ]
+.BR .SH \~[\c
+.IR depth ]
 Set an unnumbered heading.
 .
 The optional
@@ -1467,8 +1467,8 @@ preprocessor.
 .
 .
 .TP
-.B .EQ\c
-.RI " [" align ]
+.BR .EQ \~[\c
+.IR align ]
 .TQ
 .B .EN
 Demarcate an equation to be processed by the
@@ -1559,8 +1559,8 @@ of a text column or page.
 .
 .
 .TP
-.B .FS\c
-.RI \~[ marker ]
+.BR .FS \~[\c
+.IR marker ]
 Begin a footnote.
 .
 The
@@ -1735,17 +1735,17 @@ These macros are Berkeley extensions.
 .
 .
 .TP
-.B .OH \c
-.RI \[aq] left \[aq] center \[aq] right \[aq]
+.BR .OH \~\[aq]\c
+.IR left \[aq] center \[aq] right \[aq]
 .TQ
-.B .OF \c
-.RI \[aq] left \[aq] center \[aq] right \[aq]
+.BR .OF \~\[aq]\c
+.IR left \[aq] center \[aq] right \[aq]
 .TQ
-.B .EH \c
-.RI \[aq] left \[aq] center \[aq] right \[aq]
+.BR .EH \~\[aq]\c
+.IR left \[aq] center \[aq] right \[aq]
 .TQ
-.B .EF \c
-.RI \[aq] left \[aq] center \[aq] right \[aq]
+.BR .EF \~\[aq]\c
+.IR left \[aq] center \[aq] right \[aq]
 The
 .B OH
 and
@@ -1875,8 +1875,8 @@ Arrange page text in two columns.
 .
 .
 .TP
-.B .MC\c
-.RI " [" column-width " [" gutter-width ]]
+.BR .MC \~[\c
+.IR column-width " [" gutter-width ]]
 Arrange page text in multiple columns.
 .
 If you specify no arguments,
@@ -1953,11 +1953,11 @@ and then calls
 .
 .
 .TP
-.B .XS\c
-.RI \~[ page-number ]
+.BR .XS \~[\c
+.IR page-number ]
 .TQ
-.B .XA\c
-.RI \~[ page-number \~[ indentation ]]
+.BR .XA \~[\c
+.IR page-number \~[ indentation ]]
 .TQ
 .B .XE
 Begin,



reply via email to

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