gbranden pushed a commit to branch master in repository groff. commit 1de7cff46dec169d9611f054ef0666bc2cfcef93 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Mon Feb 24 17:53:22 2025 -0600
[man,mdoc]: Fix Savannah #66836 (`\-` in HTML). * tmac/an.tmac ([initialization]) * tmac/doc.tmac ([initialization]): Remap the text minus sign character `\-` to `\N'45'` (U+002D) on the "html" device. Annotate the limited scope of this remapping more thoroughly. Fixes <https://savannah.gnu.org/bugs/?66836>. Thanks to Benno Schulenberg for the report. ANNOUNCE: Acknowledge Benno. --- ANNOUNCE | 1 + ChangeLog | 10 ++++++++++ tmac/an.tmac | 12 ++++++++++-- tmac/doc.tmac | 12 ++++++++++-- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 439138e89..4d5df5c39 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -159,6 +159,7 @@ of this release. Alex Colomar Alexander Kanavin Alexis (surryhill) +Benno Schulenberg Bjarni Ingi Gislason Brian Inglis Bruno Haible diff --git a/ChangeLog b/ChangeLog index 1b53c48ab..36670f112 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2025-02-24 G. Branden Robinson <g.branden.robin...@gmail.com> + + * tmac/an.tmac ([initialization]) + * tmac/doc.tmac ([initialization]): Remap the text minus sign + character `\-` to `\N'45'` (U+002D) on the "html" device. + Annotate the limited scope of this remapping more thoroughly. + + Fixes <https://savannah.gnu.org/bugs/?66836>. Thanks to Benno + Schulenberg for the report. + 2025-02-23 G. Branden Robinson <g.branden.robin...@gmail.com> [eqn,preconv,refer,tbl]: Trivially refactor. diff --git a/tmac/an.tmac b/tmac/an.tmac index 4992578a1..80f60aa21 100644 --- a/tmac/an.tmac +++ b/tmac/an.tmac @@ -1412,10 +1412,18 @@ contains unsupported escape sequence . .\" === Define/remap characters. === . -.\" For UTF-8, map the minus sign to the hyphen-minus to facilitate -.\" copy and paste of code examples, file names, and URLs embedding it. +.\" On output devices that typically have separate hyphen and minus sign +.\" glyphs _and_ a glyph for ASCII/ISO Latin's hybrid "hyphen-minus", +.\" remap the (text) minus sign to the hyphen-minus to facilitate copy +.\" and paste of code examples, file names, and URLs embedding it. We +.\" do this for man pages but not for general typesetting. See +.\" groff_char(7) for further background. +.\" +.\" PDF's "CMap" feature solves this problem so we don't have to. .if '\*[.T]'utf8' \ . char \- \N'45' +.if '\*[.T]'html' \ +. char \- \N'45' . .\" === Initialize. === . diff --git a/tmac/doc.tmac b/tmac/doc.tmac index 469a5ccf8..f30f21503 100644 --- a/tmac/doc.tmac +++ b/tmac/doc.tmac @@ -7216,10 +7216,18 @@ should this have been '.Em ...'? .blm doc-empty-line . . -.\" For UTF-8, map the minus sign to the hyphen-minus to facilitate -.\" copy and paste of code examples, file names, and URLs embedding it. +.\" On output devices that typically have separate hyphen and minus sign +.\" glyphs _and_ a glyph for ASCII/ISO Latin's hybrid "hyphen-minus", +.\" remap the (text) minus sign to the hyphen-minus to facilitate copy +.\" and paste of code examples, file names, and URLs embedding it. We +.\" do this for man pages but not for general typesetting. See +.\" groff_char(7) for further background. +.\" +.\" PDF's "CMap" feature solves this problem so we don't have to. .if '\*[.T]'utf8' \ . char \- \N'45' +.if '\*[.T]'html' \ +. char \- \N'45' . . .\" load local modifications _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit