bugGNU troff - Bugs: bug #51397, [PATCH] tty.tmac: Add characters...

 
 

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

Submitted by:  Bjarni Ingi Gislason <bjarniig>
Submitted on:  Wed 05 Jul 2017 10:38:36 PM UTC  
 
Category: Macro - othersSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: G. Branden Robinson <gbranden>
Open/Closed: ClosedPlanned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Thanks for the follow-up, gentlemen.

G. Branden Robinson <gbranden>
Project MemberIn charge of this item.
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>
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>
Project MemberIn charge of this item.
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:
Bjarni Ingi Gislason <bjarniig>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by schwarze (Posted a comment)
  • -unavailable- added by gbranden (Posted a comment)
  • -unavailable- added by bjarniig (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 22 Oct 2017 05:50:52 PM UTCgbrandenStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Sun 22 Oct 2017 08:27:47 AM UTCgbrandenCategoryNone=>Macro - others
      StatusNone=>Need Info
      Assigned toNone=>gbranden

    Back to the top


    Powered by Savane 3.1-cleanup1