bugGNU roff - Bugs: bug #61455, doc/pic.ms: avoid a yellow...

 
 

bug #61455: doc/pic.ms: avoid a yellow background for text when the device uses "tty.tmac"

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Wed 10 Nov 2021 01:44:04 AM UTC
   
 
Category:  Preprocessor pic Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Duplicate
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 16 Sep 2023 03:32:58 AM UTC, comment #6: 

The problem complained of in the summary is the same issue as bug #64624, and is remedied by the patch proposed there.

Dropping patch annotation; rejecting this patch.

Closing as duplicate.

G. Branden Robinson <gbranden>
Group administrator
Thu 07 Sep 2023 01:14:08 AM UTC, comment #5: 

comment #3:

> maybe we should disable the PS/PE macros in nroff mode in this document.


If that seems the best way (at least in the short term) to keep pic from confounding nroff, it should probably be done universally rather than merely in this document.

.de PS
.  sp
.  ce 1
.  nop [Picture omitted: unsupported on the terminal]
.  sp
..


Dave <barx>
Group Member
Tue 05 Sep 2023 12:45:15 PM UTC, comment #4: 

The attached patch still applies, and seems to solve the problem Bjarni identified.

comment #3:

> I think for now the thing to do is ensure that the fill color
> escape sequence is being used idiomatically.


It turns out that one of the problems afflicting this document arises even without any color references in the input, and without using -ms.  See bug #64624.

Dave <barx>
Group Member
Thu 25 Nov 2021 01:24:02 PM UTC, comment #3: 

There's not much hope in pic.ms becoming a useful document in nroff mode in the short term.

Though I have some evil ideas that could change that in the longer term.

I think for now the thing to do is ensure that the fill color escape sequence is being used idiomatically.  If it is, maybe we should disable the PS/PE macros in nroff mode in this document.

G. Branden Robinson <gbranden>
Group administrator
Tue 16 Nov 2021 09:33:19 PM UTC, comment #2: 

Changing category: While pic.ms is indeed written in the -ms macro language, the document describes the pic preprocessor, which is more in the pic purview than the ms one.  That is, this bug concerns the content of pic.ms, not the way -ms renders it.

Dave <barx>
Group Member
Wed 10 Nov 2021 07:12:44 PM UTC, comment #1: 


  There are three bugs in the patch

  1) The comment inside the .PS block is interpreted by the "pic"
     preprocessor

  2) The name of the color to be defined is missing.

  3) The addition to the text showing the code is missing. 

  The corrected patch is in the attachment.

(file #52233)

Bjarni Ingi Gislason <bjarniig>
Wed 10 Nov 2021 01:44:04 AM UTC, original submission:  

From a99d6bbcc181520ecce46622d3e45aca5b24a36c Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Wed, 10 Nov 2021 01:38:36 +0000
Subject: [PATCH] doc/pic.ms: Avoid a yellow background for text when the
 device uses "tty.tmac"

  Fix a wrong coloring of background (fill color),
when an undefined color is used.

  Seen with "nroff -p -t -ms pic.ms | less -R".

  Seach for "Three-dim", and scroll up.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 doc/pic.ms | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/pic.ms b/doc/pic.ms
index fa5628e59..2613844b5 100644
--- a/doc/pic.ms
+++ b/doc/pic.ms
@@ -2593,6 +2593,14 @@ arrow from Top.D.end to Anchor.ne
 .PP
 .KS
 .PS
+.de END_COMMENT
+..
+.ig END_COMMENT
+  If a used color is undefined, the remainder of the text in the
+document gets a yellow background.
+.END_COMMENT
+.if !m gold .defcolor rgb #0000ff\"blue
+.if !m goldenrod .defcolor rgb #ff0000\"red
 # a three-dimensional block
 #
 # tblock(<width>, <height>, <text>)
--
2.33.0


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
file #52233:  0001-doc-pic.ms-Avoid-a-yellow-background-for-text-when-the.txt added by bjarniig (1KiB - text/plain - groff: doc/pic.ms; a patch)

 

Depends on the following items: None found

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 (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-09-16 gbranden Severity2 - Minor 3 - Normal
        Item GroupRendering/Cosmetics Incorrect behaviour
        StatusNone Duplicate
        Assigned toNone gbranden
        Open/ClosedOpen Closed
        Summary[PATCH] doc/pic.ms: Avoid a yellow background for text when the device uses &quot;tty.tmac&quot; doc/pic.ms: avoid a yellow background for text when the device uses "tty.tmac"
    2021-11-25 gbranden Severity3 - Normal 2 - Minor
    2021-11-16 barx Carbon-CopyRemoved 93119 -
    2021-11-16 barx CategoryMacro ms Preprocessor pic
    2021-11-10 bjarniig Attached File- Added 0001-doc-pic.ms-Avoid-a-yellow-background-for-text-when-the.txt, #52233

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code