.im man.im
.NM kwic produce lines for KWIC index
.SY kwic
.FU
.ital kwic
writes one or more "folded"
versions of each input line to its output.
A line is "folded" at the beginning of each alphanumeric string within
the line by writing from that string through the end of the line, followed
by the fold character
.ital $,
followed by the beginning of the line.

.ital kwic
is used with
.ital sortf
and
.ital unrotate
to produce a KeyWord In Context, or KWIC, index.
.EG
.Q1
kwic
This is a test.
.ital "This is a test.$"
.ital "is a test.$This"
.ital "a test.$This is"
.ital "test.$This is a"
.Q2
Normal usage is
.Q1
kwic {document }temp1
sortf {temp1 }temp2
unrotate {temp2
.Q2
