  To decipher complex patterns of gravity-mode period spacings observed for
intermediate-mass main-sequence stars is an important step toward the better
understanding of the structure and dynamics in the deep radiative region of the
stars. In this study, we apply JWKB approximation to derive a semi-analytical
expression of the g-mode period spacing pattern, for which the gradient in the
Brunt-V\"ais\"al\"a frequency is taken into account. The formulation includes a
term $P^{-1} B_{\star}$, where $P$ and $B_{\star}$ represent the g-mode period
and degree of the structural variation, the latter of which especially is
related to the steepness of the gradient of the Brunt-V\"ais\"al\"a frequency.
Tests with 1-dimensional stellar models show that the semi-analytical
expression derived in this study is useful for inferring the degree of the
structural variation $B_{\star}$ with accuracy of $\sim 10\,\%$ in the case of
relatively massive intermediate-mass models with the mass $M$ larger than $3
\,M_{\odot}$. The newly formulated expression will possibly allow us to put
further constraints on, e.g., mixing processes inside intermediate-mass
main-sequence g-mode pulsators such as $\beta$ Cep, SPB, and $\gamma$ Dor stars
that have been principal targets in asteroseismology.
