In the case of the gluon-fusion process in deep-inelastic leptoproduction,
I explicitly show how to incorporate NLO corrections in a Monte-Carlo event
generator by a subtraction method. I calculate the parton densities to be
used by the event generator in terms of (MS) over bar densities. The method
is generalizable. A particular motivation for treating the gluon-fusion pr
ocess is to treat diffractive deep-inelastic scattering properly, since in
diffractive scattering the gluon density dominates the quark densities. I a
lso propose a modified algorithm for treating parton kinematics in event ge
nerators; the new algorithm results in much simpler formulae for the NLO co
rrections. A disadvantage of the new method is that some of the generated e
vents may have negative weights. However, an adjustable cut-off function is
present in the formalism, and this permits a renormalization-group-like tr
ansformation that can be used to at least reduce the proportion of events w
ith negative weights.