From 4a76d66ad9eac9c81e3db60eec7b0553177e059e Mon Sep 17 00:00:00 2001 From: "G. Branden Robinson" Date: Tue, 5 May 2026 07:34:41 -0500 Subject: [PATCH] doc/nethack.6: Be more portable to old roffs (4/4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define strings for directional single quotation marks. groff_man_style(7): Notes Some tips on composing and troubleshooting your man pages follow. ... • When and how should I use quotation marks? ... Obtaining directional single quotation marks is more of a challenge. Historically, man pages used ` and ', which troff rendered on typesetters as ‘ and ’, exclusively for them. However, in recent years, some distributors of groff have chosen to override the meanings of these characters in man pages, remapping them to their Unicode Basic Latin code points. Unfortunately, ` and ' are the only reliable means of obtaining directional single quotation marks in AT&T troff; in that implementation, often no special character escape sequences exist to obtain them. Further, AT&T troff’s special character identifiers, like its font names, were device‐specific. To achieve quotation portably in man pages rendered both by AT&T and more modern troffs, consider adding a preamble to your page after the TH call as follows. .ie \n(.g \{\ . ds oq \[oq]\" . ds cq \[cq]\" .\} .el \{\ . ds oq `\" . ds cq '\" .\} You must then use the \* escape sequence to interpolate the quotation mark strings. The command .RB \*(oq "while !\& git pull; do sleep 10; done" \*(cq retries an update from the repository until it succeeds. If this procedure seems complex, petition your distributor to revert their remapping of the ` and ' characters. --- doc/nethack.6 | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/nethack.6 b/doc/nethack.6 index 0077408ec..9a2631a41 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -16,12 +16,19 @@ .ie \n(.g .hy 12 .el .hy 14 .ds Na Robert Patrick Rankin -.\" DWB, Solaris 10, and Plan 9 troffs don't support `\(ti`. Assume the -.\" best, then detect these older troffs and fall back as needed. +.\" DWB, Solaris 10, and Plan 9 troffs don't support `\(ti`, `\(oq`, or +.\" `\(cq`. Assume the best, then detect these older troffs and fall +.\" back as needed. .\" .\" Put NO SPACE between special character and comment escape sequences. .ds ~ \(ti\" The name "ti" is taken by *roff's `ti` request. -.if !\n(.g .ds ~ ~ +.ds oq \(oq +.ds cq \(cq +.if !\n(.g \{\ +. ds ~ ~ +. ds oq ` +. ds cq ' +.\} .\" Define string to exercise groff's hyphenless break point feature. .ie \n(.g .ds : \: .el .ds : \" empty @@ -390,7 +397,7 @@ option alone will print out the list of your scores on the current version. An immediately following .B \-v reports on all versions present in the score file. -.RB \(oq \-s | \-s\*_\-v \(cq +.RB \*(oq \-s | \-s\*_\-v \*(cq may also be followed by arguments .B \-p .I profession @@ -402,7 +409,7 @@ Either can be specified multiple times to include more than one role or more than one race. When both are specified, score entries which match either the role or the race (or both) are printed rather than just entries which match both. -.RB \(oq \-s | \-s\*_\-v \(cq +.RB \*(oq \-s | \-s\*_\-v \*(cq may be followed by one or more player names to print the scores of the players mentioned, by 'all' to print out all scores, or by a number to print that many top scores. @@ -441,7 +448,7 @@ customize aspects of how the game operates. .BR \-\-usage " or " \-\-help will display information similar to this manual page, then exit. Use -.RB \(oq "nethack \-\-usage | more" \(cq +.RB \*(oq "nethack \-\-usage | more" \*(cq to read it a page at a time. .SH AUTHORS Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote the