bugGNU roff - Bugs: bug #51397, tty.tmac: Add characters \[la] and...

 
 

bug #51397: tty.tmac: Add characters \[la] and \[ra]

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Wed 05 Jul 2017 10:38:36 PM UTC
   
 
Category:  Macro - others/general Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Invalid
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 22 Oct 2017 05:50:27 PM UTC, comment #5: 

Thanks for the follow-up, gentlemen.

G. Branden Robinson <gbranden>
Group administrator
Sun 22 Oct 2017 05:44:30 PM UTC, comment #4: 

  This was an error of mine.

  I had changed an option for "man" (--encoding=UTF-8) and thougt it was for
the input file, but actually it is for the output.

Bjarni Ingi Gislason <bjarniig>
Sun 22 Oct 2017 02:39:35 PM UTC, comment #3: 

Please just close the ticket as invalid.

These two character escapes are already defined for all terminal devices:

- for ascii, in font/devascii/R.proto
- for EBCDIC, in font/devcp1047/R.proto
- for UTF-8, in src/libs/libgroff/glyphuni.cpp

Bjarni himself already answered your question in comment #1 and said there is nothing to fix.

schwarze@isnote $ cat angle.roff                                              
start \[la]enclosed\[ra] end
schwarze@isnote $ groff -Tascii angle.roff | head -n 1
start <enclosed> end
schwarze@isnote $ groff -Tutf8 angle.roff | head -n 1 
start ⟨enclosed⟩ end
schwarze@isnote $ groff -man -Tascii angle.roff | head -n 1
start <enclosed> end
schwarze@isnote $ groff -man -Tutf8 angle.roff | head -n 1 
start ⟨enclosed⟩ end
schwarze@isnote $ groff -mdoc -Tascii angle.roff | head -n 1
start <enclosed> end
schwarze@isnote $ groff -mdoc -Tutf8 angle.roff | head -n 1 
start ⟨enclosed⟩ end
schwarze@isnote $ nroff -Tascii angle.roff | head -n 1
start <enclosed> end
schwarze@isnote $ nroff -Tutf8 angle.roff | head -n 1 
start ⟨enclosed⟩ end
schwarze@isnote $ pkg_info | grep groff
groff-1.22.3p8      GNU troff typesetter
schwarze@isnote $ uname -a
OpenBSD isnote.usta.de 6.2 GENERIC.MP#123 amd64

Ingo Schwarze <schwarze>
Group Member
Sun 22 Oct 2017 08:07:57 AM UTC, comment #2: 

Hi Bjarni,

Are you sure this isn't a problem with your terminal emulator or installed fonts for the window system?

I can get left and right angle brackets easily with a UTF-8 environment on an xterm.

$ cat lara.man
.TH foobar 1 x y z
.SH NAME
foobar \- bar for foo
.SH DESCRIPTION
\[la]place description here\[ra]

<pre>
$ MANWIDTH=80 man -l -Tutf8 ./lara.man
foobar(1)                              z                             foobar(1)



NAME
       foobar - bar for foo

DESCRIPTION
       ⟨place description here⟩



y                                      x                             foobar(1)
</pre>

It also degrades to ASCII for more primitive environments.

<pre>
$ MANWIDTH=80 man -l -Tascii ./lara.man
foobar(1)                              z                             foobar(1)



NAME
       foobar - bar for foo

DESCRIPTION
       &lt;place description here&gt;



y                                      x                             foobar(1)
</pre>

G. Branden Robinson <gbranden>
Group administrator
Thu 06 Jul 2017 01:08:36 AM UTC, comment #1: 

  Correction: The question mark is displayed by "man".

  This patch is unnecessary.  The characters are defined in the font, but "man" treats the input as UTF-8 characters, therefore \[la] is interpreted as a code u27E8 instead of u003C.

Bjarni Ingi Gislason <bjarniig>
Wed 05 Jul 2017 10:38:36 PM UTC, original submission:  


From 485906e1b1e9f52bc0913db97c0c9e3a2390ecd6 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Wed, 5 Jul 2017 21:56:26 +0000
Subject: [PATCH] tty.tmac: Add angle characters \[la] and \[ra]

  Otherwise they are displayed as a question mark with "nroff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 tmac/tty.tmac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tmac/tty.tmac b/tmac/tty.tmac
index 938bacfb..5aea818e 100644
--- a/tmac/tty.tmac
+++ b/tmac/tty.tmac
@@ -65,6 +65,8 @@
 .fchar \[Eu] EUR
 .fchar \[.i] i
 .fchar \[bq] ,
+.fchar \[la] <
+.fchar \[ra] >
 .
 .if '\*[.T]'utf8' \
 .  mso unicode.tmac
--
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:
   

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

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-10 gbranden Summary[PATCH] tty.tmac: Add characters \[la] and \[ra] tty.tmac: Add characters \[la] and \[ra]
    2022-01-22 gbranden Item GroupNone Incorrect behaviour
    2017-10-22 gbranden StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2017-10-22 gbranden CategoryNone Macro - others/general
        StatusNone Need Info
        Assigned toNone gbranden

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code