Commit Graph

10 Commits

Author SHA1 Message Date
G. Branden Robinson
6a8edddcb9 doc/tmac.nh: Drop space after \c escape sequence
Fixes warning in category "syntax" from the forthcoming groff 1.24.

troff:<standard input>:790: warning: ignoring a space on input line after output line continuation escape sequence
[94 more occurrences]
2026-02-07 05:00:22 -06:00
nhkeni
bdff809099 Update hyphenation for *.mn and *.6 files. 2024-12-24 12:37:20 -05:00
G. Branden Robinson
e318d21afc doc/tmac.nh (ED): Don't dedent below zero.
This quietens several warnings from GNU troff in the "range" category.

troff: backtrace: './doc/tmac.nh':92: macro 'ED'
troff: backtrace: file './doc/Guidebook.mn':5950
troff:./doc/Guidebook.mn:5950: warning: treating -120u indentation as
zero

Unfortunately, the similar `ed` macro in Bishop's "mn" package
contributes several more.

But with this change (and its forerunners in this series), the NetHack
Guidebook is now warning-free with "-wall -Wtab -Wrange" ("mn" has
problems with tab characters too), even with the increasingly fastidious
syntactical checks of the forthcoming groff 1.24 release.
2024-09-10 06:45:00 -05:00
G. Branden Robinson
cbff67b0d6 doc/tmac.nh: Fix mistaken syntax.
The forthcoming groff 1.24 has a new diagnostic that detects ill-formed
numeric expressions.  It has found one here.

I'm not positive what was intended here, but it may have been an attempt
to force interpretation of the first macro argument as a number.  This
change employs a more idiomatic (but still old-school) technique.

The salient fact is that, in *roff, you can't affix a scaling unit after
a closing parenthesis (or another scaling unit).

In GNU troff the `\B` escape sequence, an extension, permits the testing
of putative numeric expressions for validity.

troff:./doc/Guidebook.mn:268: warning: expected end of line or an
auto-increment argument in register definition request; got character
'v'

See <https://savannah.gnu.org/bugs/?64240>.
2024-09-10 06:45:00 -05:00
G. Branden Robinson
ade0c02b20 Make it easier for the Guidebook to find macros.
* doc/Guidebook.mn: Make the Guidebook buildable from the top of the
  source tree, not just inside the "doc" directory.  Try to load its
  "nh" macro package from the current working directory and from "doc".

* doc/tmac.nh: Allocate new register `nH` to the purpose of detecting
  multiple loads, and skip file content if detected.  This is the 1970s
  nroff form of an "#include guard".  groff's "an-ext.tmac" uses the
  same technique for portability.

Also I removed a tab character.  Per the groff Texinfo manual:

     One possibly irritating idiosyncrasy is that tabs should not be
     used to vertically align comments in the source document.  Tab
     characters are not treated as separators between a request name and
     its first argument, nor between arguments.

Here's an example of how one groff macro package works around the
problem.

$ sed -n '402,406p' contrib/mm/m.tmac
.ds LetCN CONFIDENTIAL\"                Confidential default
.ds LetSA To Whom It May Concern:\"     Salutation default
.ds LetAT ATTENTION:\"                  Attention string
.ds LetSJ SUBJECT:\"                    Subject string
.ds LetRN In reference to:\"            Reference string
2024-09-10 06:44:43 -05:00
G. Branden Robinson
ecd2e4dba1 Set up *roff hyphenation more carefully.
* doc/Guidebook.mn: Remove workaround, in favor of...
* doc/tmac.n: ...setting automatic hyphenation mode appropriate to
  hyphenation systems used by AT&T-descended troffs on the one hand
  ("suftab") and groff (TeX hyphenation patterns) on the other.

modify results of pull request #977 to target tmac.nh instead.

Guidebook update to trigger the process following pull request 977.
2023-02-09 20:07:18 -05:00
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
keni
78716ab4bf attempt to fix .BR macro 2019-11-14 08:20:38 -05:00
keni
1825f51c4f Minor Guidebook.{tex,mn} wording and typos. UR macro. 2019-02-22 20:00:14 -05:00
PatR
bb62ab6fc1 another Guidebook update - mostly NETHACKOPTIONS
Move some 'roff macros from Guidebook.mn to new file tmac.nh.

Header for tmac.nh is not being updated, even after explicitly adding
it to .gitattributes.  I'm not sure what I've done wrong.  (I'm using
'git nhadd doc/' here rather than explicit 'git nhadd doc/tmac.nh'.)

In Guidebook.mn, change the ``setenv NETHACKOPTIONS'' example so that
it fits within one line in Guidebook.txt.  (I looked at 3.4.3's
edition of that file and the example went not just beyond the margin
of the formatted text but beyond 80 columns, so wrapped in an ugly
fashion.)  I had previously changed 'autoquiver' to 'color' to shorten
it, now have changed '!autopickup' to '!leg' to show an example of
truncated option name as well as shorten, and also 'fruit:papaya' to
'fruit:lime' to squeeze out the last two columns needed to fit within
the text margin while retaining 'name:Blue Meanie' as requested.
Guidebook.txt shows both NETHACKOPTIONS examples with indentation
suppressed, Guidebook.ps uses normal indentation (evidently using a
narrower font, even with \f(CR (constant-width Roman) to approximate
TeX's \tt, since the indented example fits fine and looks better).

Some Guidebook.tex catchup.  I suspect that lots of bits and bobs
don't match between Guidebook.mn and Guidebook.tex these days.
Particularly quoting and variant font (italics, bold, \tt) usage.
Also the recently added box around the sample screenshot.  This
modifies the screenshot to match Guidebook.mn's, reflecting change
in status field spacing by STATUS_HILITES.
2018-10-27 00:42:11 -07:00