I'm going through a fluid dynamics text and I'm a little confused by a listed relation. The first adiabatic index is defined as

$$\Gamma_1 = \left(\frac{\partial \ln P}{\partial \ln \rho}\right)_s,$$

where $$P$$ is the pressure, $$\rho$$ is the density, and $$S$$ is the entropy of the system. It is stated that $$\Gamma_1$$ is related to the ratio of specific heat capacities by

$$\Gamma_1 = \chi_\rho \gamma = \left(\frac{\partial \ln P}{\partial \ln \rho}\right)_T \frac{T\left(\frac{\partial S}{\partial T}\right)_P}{T\left(\frac{\partial S}{\partial T}\right)_V}.$$

I've been going through the various Maxwell relations and different applications of Schwarz's theorem, but I can't seem to work out why this is true. Can someone please explain how this equality stands?

From the density definition $$\rho\equiv m/V$$, a constant-mass assumption, and the triple product rule:
\begin{align}\frac{\left.\dfrac{\partial \ln P}{\partial\ln\rho}\right|_S}{\left.\dfrac{\partial \ln P}{\partial\ln\rho}\right|_T}=\frac{\dfrac{\rho}{P}\left.\dfrac{\partial P}{\partial \rho}\right|_S}{\dfrac{\rho}{P}\left.\dfrac{\partial P}{\partial \rho}\right|_T}=\frac{\left.\dfrac{\partial P}{(-m/V^2)\partial V}\right|_S}{\left.\dfrac{\partial P}{(-m/V^2)\partial V}\right|_T}=\frac{-\left(\dfrac{\partial V}{\partial S}\right)^{-1}_P\left(\dfrac{\partial S}{\partial P}\right)^{-1}_V}{-\left(\dfrac{\partial V}{\partial T}\right)^{-1}_P\left(\dfrac{\partial T}{\partial P}\right)^{-1}_V}=\frac{\left.\dfrac{\partial S}{\partial T}\right|_P}{\left.\dfrac{\partial S}{\partial T}\right|_V}=\frac{c_P}{c_V}.\end{align}