  Future microcalorimeter X-ray observations will resolve spectral features in
unmatched detail. Understanding the line formation processes in the X-rays
deserves much attention. The purpose of this paper is to discuss such processes
in the presence of a photoionizing source. Line formation processes in one and
two-electron species are broadly categorized into four cases. Case A occurs
when the Lyman line optical depths are very small and photoexcitation does not
occur. Line photons escape the cloud without any scattering. Case B occurs when
the Lyman-line optical depths are large enough for photons to undergo multiple
scatterings. Case C occurs when a broadband continuum source strikes an
optically thin cloud. The Lyman lines are enhanced by induced radiative
excitation of the atoms/ions by continuum photons, also known as continuum
pumping. A fourth less-studied scenario, where the Case B spectrum is enhanced
by continuum pumping, is called Case D. Here, we establish the mathematical
foundation of Cases A, B, C, and D in an irradiated cloud with Cloudy. We also
show the total X-ray emission spectrum for all four cases within the energy
range 0.1 - 10 keV at the resolving power of XRISM around 6 keV. Additionally,
we show that a combined effect of electron scattering and partial blockage of
continuum pumping reduces the resonance line intensities. Such reduction
increases with column density and can serve as an important tool to measure the
column density/optical depth of the cloud.
