dot/profile: Use control sequences rather than overstriking in man pages.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 22 Jun 2020 10:42:21 +0000 (11:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 22 Jun 2020 10:42:21 +0000 (11:42 +0100)
The traditional overstriking is ambiguous regarding `_^H_', which may be
underlined (italics) or bold.  Pages like less(1) typically guess based
on the surrounding context, but this seriously screws up some fiddly
cases which switch between bold and underlining exactly at the boundary
between a non-underscore and an underscore.

The main Groff documentation is fairly adamant that this is the default
behaviour, but the Debian `/etc/groff/{man,mdoc}.local' files override
this unless `GROFF_SGR' is set nonempty in the environment.  This is
mentioned in the `changelog.Debian' file and nowhere else.

dot/profile

index 3962b2b..baa996d 100644 (file)
@@ -196,6 +196,9 @@ if __mdw_programp global; then
   export LESSGLOBALTAGS
 fi
 
+## Get Debian `groff' to produce control sequences rather than overstriking.
+GROFF_SGR=t; export GROFF_SGR
+
 ###--------------------------------------------------------------------------
 ### Miscellaneous things.