  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 MSbar densities. The method is
generalizable. A particular motivation for treating the gluon-fusion process is
to treat diffractive deep-inelastic scattering properly, since in diffractive
scattering the gluon density dominates the quark densities. I also propose a
modified algorithm for treating parton kinematics in event generators; the new
algorithm results in much simpler formulae for the NLO corrections. A
disadvantage of the new method is that some of the generated events may have
negative weights. However, an adjustable cut-off function is present in the
formalism, and this permits a renormalization-group-like transformation that
can be used to at least reduce the proportion of events with negative weights.
