bugGNU roff - Bugs: bug #51468, [man] revert change of '.it' to...

 
 

bug #51468: [man] revert change of '.it' to '.itc' for some macros

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Fri 14 Jul 2017 06:10:50 PM UTC
   
 
Category:  Macro man Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Jun 2022 12:35:11 PM UTC, comment #4: 


commit 09c028f35ace54bfc3593bc24e5567a8b9aec3d1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jun 7 02:24:59 2022 -0500

    [man]: Fix Savannah #51468.

    * tmac/an.tmac (SH, SS, B, I, SM, SB): Set input trap with `it` instead
      of `itc` for better Unix Version 7 man(7) compatibility.

    Fixes <https://savannah.gnu.org/bugs/?51468>.  Also see discussion at
    https://lists.gnu.org/archive/html/groff/2022-06/msg00020.html et
    sequentia (amid a vigorous bikeshedding of `\&`'s name).

    This exposes markup errors in several man pages that use `TP` with `\c`
    and single-font macros.


G. Branden Robinson <gbranden>
Group administrator
Tue 07 Jun 2022 05:55:34 AM UTC, comment #3: 

Resurrecting!

See https://lists.gnu.org/archive/html/groff/2022-06/msg00048.html for rationale.

However the patch offered is incomplete, and does not address `SH` and `SS`.  Removing tag.

G. Branden Robinson <gbranden>
Group administrator
Sun 19 Nov 2017 05:06:56 AM UTC, comment #2: 

I'm attaching my alternative fix.

groff_hdtbl(7) uses a bunch of private font-family switching macros, so the workaround is kind of gross.  man(7)'s failure to follow in ms(7)'s footsteps and provide a simple .R macro is another wart that makes this worse than it should be.

On the other hand, the fix to groff_out(5) is clean and, dare I say, idiomatic.

(file #42437)

G. Branden Robinson <gbranden>
Group administrator
Sun 19 Nov 2017 04:22:21 AM UTC, comment #1: 

I'm closing this as a "won't fix", which is something I normally don't like to do.

See the discussion at https://lists.gnu.org/archive/html/groff/2017-04/msg00065.html and vicinity for why.

However, it is true that the groff_out(5) and groff_hdtbl(7) pages need to render correctly, so I am committing patch shortly to fix them.

G. Branden Robinson <gbranden>
Group administrator
Fri 14 Jul 2017 06:10:50 PM UTC, original submission:  

 The simple font (one letter) and size changing (SM, SB) macros don't need
a request '.itc' to do their job.
That request can extend its influence too far.

  An example from "groff_out.5.man" shows that:

.B D\c
\~commands are assumed to be device-specific.

  A transparent line indicator (\!) should work for those macros if more
than one line is asked for.

  Macros that operate on the whole next input line do benefit from an '.itc'.
The next line can then be split into several source lines (for example all
beginning with a macro-call).

  An alternative could be to use a transparent line indicator (\!).



From 2566b2b918e4a7a963a42fb86439d81cd1afcd49 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Fri, 14 Jul 2017 17:57:16 +0000
Subject: [PATCH] Reverse the change '.it' to '.itc' for the simple font, size changing macros

  The simple font (one letter) and size changing (SM, SB) macros don't need
a request '.itc' to do their job.
That request can extend its influence too far.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/an-old.tmac | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index 1091e3d2..bc1de70b 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -376,25 +376,26 @@
 ..
 .
 .de1 B
-.  itc 1 an-trap
+.  it 1 an-trap
 .  ft B
 .  if \\n[.$] \&\\$*
 ..
 .
 .de1 I
-.  itc 1 an-trap
+.  it 1 an-trap
 .  ft I
+.\" The italic correction gets lost if a '\c' is in an argument
 .  if \\n[.$] \,\\$*\/
 ..
 .
 .de1 SM
-.  itc 1 an-trap
+.  it 1 an-trap
 .  ps -1
 .  if \\n[.$] \&\\$*
 ..
 .
 .de1 SB
-.  itc 1 an-trap
+.  it 1 an-trap
 .  ps -1
 .  ft B
 .  if \\n[.$] \&\\$*
--
2.13.2

Bjarni Ingi Gislason <bjarniig>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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 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 16 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-15 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
    2022-06-07 gbranden Severity1 - Wish 3 - Normal
        Item GroupFeature change Incorrect behaviour
        StatusRejected In Progress
        Open/ClosedClosed Open
        Summary[PATCH] [man] revert change of '.it' to '.itc' for some macros [man] revert change of '.it' to '.itc' for some macros
    2022-03-05 gbranden Summary[PATCH] Reverse the change '.it' to '.itc' for the simple macros [PATCH] [man] revert change of '.it' to '.itc' for some macros
    2018-11-05 gbranden Assigned toNone gbranden
    2017-11-19 gbranden Attached File- Added 51468-alternative-fix.diff, #42437
    2017-11-19 gbranden CategoryNone Macro man
        Severity3 - Normal 1 - Wish
        Item GroupNone Feature change
        StatusNone Rejected
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code