gbranden pushed a commit to branch master
in repository groff.

commit e4204b5c080d8e8e7668d0c3f025ebde4d5e2765
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jan 4 07:52:42 2026 -0600

    groff_mdoc(7): Coach users regarding use of `\-`.
    
    * tmac/groff_mdoc.7.man (Other possible pitfalls): Advise composers of
      mdoc(7) documents to use `\-` for copy-and-pastable hyphen-minus
      characters.
    
    Fixes <https://savannah.gnu.org/bugs/?67881>.  Thanks to Bjarni Ingi
    Gislason for pointing out incorrect usage in sudo(8).
---
 ChangeLog             |  9 +++++++++
 tmac/groff_mdoc.7.man | 16 ++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 56013ad28..3242ddfd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-01-04  G. Branden Robinson <[email protected]>
+
+       * tmac/groff_mdoc.7.man (Other possible pitfalls): Advise
+       composers of mdoc(7) documents to use `\-` for copy-and-pastable
+       hyphen-minus characters.
+
+       Fixes <https://savannah.gnu.org/bugs/?67881>.  Thanks to Bjarni
+       Ingi Gislason for pointing out incorrect usage in sudo(8).
+
 2026-01-03  G. Branden Robinson <[email protected]>
 
        * src/roff/groff/tests/\
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 4d6a28065..3df5de0f8 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -570,6 +570,22 @@ below.
 .
 .
 .Pp
+As a typesetting system,
+.Xr roff
+distinguishes hyphens,
+minus signs,
+and various sorts of dash.
+.
+When inputting a hyphen or dash
+.Pq Dq hyphen-minus
+that is intended for copy-and-paste to shell prompts,
+program code,
+or URLs,
+prefix it with the escape character:
+.Ql \[rs]\- .
+.
+.
+.Pp
 The formatter attempts to detect the ends of sentences and by default
 puts the equivalent of two spaces between sentences on the same output
 line;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to