From b4e3f3f095d78f0bf530c63dff2ca5b0a6455645 Mon Sep 17 00:00:00 2001 From: John Gardner Date: Sat, 22 Oct 2022 02:11:37 +1100 Subject: [PATCH] doc: fix display of "problematic" ASCII characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When preparing output for a terminal that supports Unicode, Groff remaps the following characters to typographically "fancier" versions: ^ (U+005E) -> ˆ (U+02C6) ~ (U+007E) -> ˜ (U+02DC) - (U+002D) -> ‐ (U+2010) ` (U+0060) -> ‘ (U+2018) ' (U+0027) -> ’ (U+2019) This transformation is normally desirable in high-quality typeset output (PDF and PostScript), but frequently problematic in terminal display. As described in groff_char(7), the following escape sequences are needed to display the aforementioned characters as they appear in source code: ^ -> \(ha (Mnemonic: "hat") ~ -> \(ti (Mnemonic: "tilde") - -> \- ` -> \(ga (Mnemonic: "grave accent") ' -> \(aq (Mnemonic: "apostrophe quote") These constructs are cumbersome to write, obstruct readability of source code, and are completely opaque to the majority of man page authors (who only care about terminal display). A simpler solution is to use `.tr` to translate these characters automatically. PR-URL: https://github.com/nodejs/node/pull/44373 Reviewed-By: James M Snell --- doc/node.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/node.1 b/doc/node.1 index e9051fea260e77..9bf182c328a768 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -26,6 +26,7 @@ .\" .\"====================================================================== . +.tr -\-^\(ha~\(ti`\(ga .Dd 2018 .Dt NODE 1 .