  Grazing-incidence X-ray diffraction (GIXRD) is a scattering technique which
allows one to characterize the structure of fluid interfaces down to the
molecular scale, including the measurement of the surface tension and of the
interface roughness. However, the corresponding standard data analysis at
non-zero wave numbers has been criticized as to be inconclusive because the
scattering intensity is polluted by the unavoidable scattering from the bulk.
Here we overcome this ambiguity by proposing a physically consistent model of
the bulk contribution which is based on a minimal set of assumptions of
experimental relevance. To this end, we derive an explicit integral expression
for the background scattering, which can be determined numerically from the
static structure factors of the coexisting bulk phases as independent input.
Concerning the interpretation of GIXRD data inferred from computer simulations,
we account also for the finite sizes of the bulk phases, which are unavoidable
in simulations. The corresponding leading-order correction beyond the dominant
contribution to the scattered intensity is revealed by asymptotic analysis,
which is characterized by the competition between the linear system size and
the X-ray penetration depth in the case of simulations. Specifically, we have
calculated the expected GIXRD intensity for scattering at the planar
liquid--vapor interface of Lennard-Jones fluids with truncated pair
interactions via extensive, high-precision simulations. The reported data cover
interfacial and bulk properties of fluid states along the whole liquid--vapor
coexistence line. A sensitivity analysis demonstrates the robustness of our
findings concerning the detailed definition of the mean interface position. We
conclude that previous claims of an enhanced surface tension at mesoscopic
scales are amenable to unambiguous tests via scattering experiments.
