groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: NEWS, PROBLEMS: Add and update item, respectively.


From: G. Branden Robinson
Subject: [groff] 01/01: NEWS, PROBLEMS: Add and update item, respectively.
Date: Fri, 27 May 2022 14:01:35 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 915a878038236769eb072f728389352c1da88719
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri May 27 12:45:14 2022 -0500

    NEWS, PROBLEMS: Add and update item, respectively.
    
    Attempt to mitigate the dire warnings of Savannah #62494.
---
 NEWS     | 15 +++++++++++++++
 PROBLEMS | 42 +++++++++++++++++++++++++++++++-----------
 2 files changed, 46 insertions(+), 11 deletions(-)

diff --git a/NEWS b/NEWS
index a353fa93..68f71904 100644
--- a/NEWS
+++ b/NEWS
@@ -380,6 +380,21 @@ o A new device control command, "background", enables 
boxes to be drawn
 grotty
 ------
 
+o The "utf8" output device now maps the input characters '^' (caret,
+  circumflex accent, or "hat") and '~' (tilde) to U+02C6 (modifier
+  letter circumflex accent) and U+02DC (small tilde), respectively, for
+  consistency with groff's other output devices.  This change is
+  expected to expose glyph usage errors in man pages.  See the
+  "PROBLEMS" file for a recipe that will conceal these errors.  A better
+  long-term approach is for man pages to adopt correct input practices;
+  the man pages groff_man_style(7), groff_char(7), and man-pages(7)
+  (subsection "Generating optimal glyphs"; from the Linux man-pages
+  project) contain such instructions.
+
+  If you maintain a generator of man(7) or mdoc(7) documents (such as a
+  tool that converts other formats to them), and need assistance, please
+  contact the groff@gnu.org mailing list and describe your situation.
+
 o A new device control command, "link", generates OSC 8 hyperlinks.
   This means that groff documents can produce clickable links in the
   terminal window for emulators that support such escape sequences.
diff --git a/PROBLEMS b/PROBLEMS
index 1235e734..90064e7d 100644
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -97,20 +97,40 @@ and pager to versions which can handle SGR.
 
 ----------------------------------------------------------------------
 
-* The UTF-8 output of grotty has strange characters for the minus, the
-  hyphen, and the right quote.  Why?
-
-The used Unicode characters (U+2212 for the minus sign and U+2010 for
-the hyphen) are the correct ones, but many programs can't search them
-properly.  The same is true for the right quote (U+201D).  To map
-those characters back to the ASCII characters, insert the following
-code snippet into the `troffrc' configuration file:
+* When viewing man pages, some characters on my UTF-8 terminal emulator
+  look funny or copy-and-paste wrong.  Why?
+
+Some Unicode Basic Latin ("ASCII") input characters are mapped to
+non-Basic Latin code points in output for consistency with other output
+devices, like PDF.  See groff_man_style(7) and groff_char(7) for correct
+input conventions and background.  If you use the correct groff special
+character escape sequences to input them, you will get correct output no
+matter what device the input is formatted for.
+
+However, many man pages are written in ignorance of the correct special
+characters to obtain the desired glyphs.  You can conceal these errors
+by adding the following to your site-local man(7) configuration.  The
+file is called "man.local"; its installation directory depends on how
+groff was configured when it was built.
 
+--- start ---
 .if '\*[.T]'utf8' \{\
-.  char \- \N'45'
-.  char  - \N'45'
-.  char  ' \N'39'
+.  char ' \[aq]
+.  char - \-
+.  char ^ \[ha]
+.  char ` \[ga]
+.  char ~ \[ti]
 .\}
+--- end ---
+
+You may also wish to do the same for "mdoc.local".
+
+In man pages (only), groff maps the minus sign special character '\-' to
+the Basic Latin hyphen-minus (U+002D) because man pages require this
+glyph and there is no historically established *roff input character,
+ordinary or special, for obtaining it when a hyphen and minus sign are
+both separately available.  To obtain a true minus sign, use the special
+character escape sequences '\(mi' or '\[mi]'.
 
 ----------------------------------------------------------------------
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]