bugGNU roff - Bugs: bug #62983, [troff] want diagnostic if '\o'...

 
 

bug #62983: [troff] want diagnostic if '\o' encountered while formatting for non-overstriking device

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Mon 29 Aug 2022 07:01:06 PM UTC
   
 
Category:  Core Severity:  1 - Wish
Item Group:  Warning/Suspicious behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 15 Oct 2022 02:52:37 AM UTC, comment #5: 

comment #1:

> "grotty can't overstrike" doesn't appear to be an accurate characterization.


As Branden notes in bug #63028, it is an accurate characterization of grohtml, so producing a warning there would seem uncontroversial.

Dave <barx>
Group Member
Wed 07 Sep 2022 04:33:34 PM UTC, comment #4: 

I should really have learned by now that it's better to open new bug reports than overload existing reports with separate but related problems.  Thus comment #3 here is now bug #63028.

Dave <barx>
Group Member
Wed 07 Sep 2022 03:58:39 AM UTC, comment #3: 

In the meantime, it's probably useful for the documentation to warn nroff users that (1) few (no?) modern terminal emulators support overstruck characters, and (2) if they must use \o, they should think about the order in which they specify the characters, as only the last one is likely to end up visible.  (And maybe (3) that if they want to use \o for accented characters, there are more robust ways to achieve that.)

Dave <barx>
Group Member
Fri 02 Sep 2022 10:58:51 PM UTC, comment #2: 

Hi Dave,

comment #1:

> "grotty can't overstrike" doesn't appear to be an accurate characterization.  grotty cheerfully produces overstruck characters:


> $ printf '\o"+o"\n' | nroff | head -1 | od -c
> 0000000   +  \b   o  \n
> 0000004


> And depending on where that output goes, the overstriking can happen:


> $ printf '\o"+o"\n' | nroff | lp -o raw
> request id is officejet-553 (0 file(s))


> This emits a page from my printer with an "o" and "+" on top of each other.  (And I seem to recall a time before some CUPS upgrade when I could get overstruck characters without the "-o raw" option.)
>
> It is extant terminal emulators, not grotty, that fail to overstrike characters.  But I don't think anything theoretically prevents, say, a new xterm fork from supporting the capability.


Fair point.

This will probably have to wait for the terminfo-enhanced grotty I've been dreaming about.

G. Branden Robinson <gbranden>
Group administrator
Fri 02 Sep 2022 07:40:24 AM UTC, comment #1: 

"grotty can't overstrike" doesn't appear to be an accurate characterization.  grotty cheerfully produces overstruck characters:

$ printf '\o"+o"\n' | nroff | head -1 | od -c
0000000   +  \b   o  \n
0000004

And depending on where that output goes, the overstriking can happen:

$ printf '\o"+o"\n' | nroff | lp -o raw
request id is officejet-553 (0 file(s))

This emits a page from my printer with an "o" and "+" on top of each other.  (And I seem to recall a time before some CUPS upgrade when I could get overstruck characters without the "-o raw" option.)

It is extant terminal emulators, not grotty, that fail to overstrike characters.  But I don't think anything theoretically prevents, say, a new xterm fork from supporting the capability.

Dave <barx>
Group Member
Mon 29 Aug 2022 07:01:06 PM UTC, original submission:  

Overstriking is futile on nroff devices, in groff, because we don't have device descriptions for any nroff-mode devices that are capable of it.

Consider a diagnostic to emit a warning about this if an overstrike escape sequence is encountered on the input when in nroff mode.

In the future, if we get an nroff-mode driver that can overstrike (grotty and grohtml can't), we might introduce a new device description file directive, like "can-overstrike", to reflect this capability, and make the diagnostic conditional on that.

But for now, no such orthogonality exists.

See thread beginning at https://lists.gnu.org/archive/html/groff/2022-08/msg00223.html for a discussion.

G. Branden Robinson <gbranden>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-10 gbranden StatusPostponed None
        Dependencies- Depends on bugs #63583
    2022-09-02 gbranden StatusNone Postponed
        Summary[troff] want diagnostic if '\o' encountered while formatting for nroff device [troff] want diagnostic if '\o' encountered while formatting for non-overstriking device

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code