troff/nroff, hyphenation

toggling it

Hyphenation is on by default.

.nh
turns it off,
.hy mode
turns it on.

The optional argument to .hy is a bitmap of additional restrictions on hyphenation:

2
Don't hyphenate the last word on a page.
4
Don't split off the last two characters from a word.
8
Don't split off the first two, either.
.hy 0
is the same as .nh, and
.hy 1
is the same as .hy, it just turns unrestricted hyphenation on.

hyphenating a word

.hw wo-rd1 wo-rd2 ...
specifies how to hyphenate ``word1,'' ``word2,'' etc. for a whopping total of 128 characters.

hyphenating one particular case

.hc c
specifies c as the ``hyphenation character.'' (Default is \%).
\% word
If the hyphenation character occurs before a word, the word is not hyphenated.
wo\%rd
If the hyphenation character occurs in a word, the word should be hyphenated there and nowhere else.

\% is listed in the appendix as ``the default optional hyphenation character.'' It prints as octal 024 (^T). In our local system, .hc x succeeds in disabling \% as hyphenation character, but doesn't seem to enable x.