Solution (source code)

= Solution

The latent heat for converting liquid to gas at coexistence is
$$
L=T(S_{\mathrm{gas}}-S_{\mathrm{liq}})
=H_{\mathrm{gas}}-H_{\mathrm{liq}},
$$
with all quantities taken per mole or per particle consistently. Along the <phase coexistence curve>, the two <Gibbs free energy> values agree:
$$
G_{\mathrm{gas}}(T,p)=G_{\mathrm{liq}}(T,p).
$$
Since
$$
dG=-S\,dT+V\,dp,
$$
differentiating the equality along the curve gives
$$
-S_{\mathrm{gas}}\,dT+V_{\mathrm{gas}}\,dp
=-S_{\mathrm{liq}}\,dT+V_{\mathrm{liq}}\,dp.
$$
Therefore the <Clausius-Clapeyron relation> is
$$
\boxed{
\frac{dp}{dT}
=\frac{S_{\mathrm{gas}}-S_{\mathrm{liq}}}
{V_{\mathrm{gas}}-V_{\mathrm{liq}}}
=\frac{L}
{T(V_{\mathrm{gas}}-V_{\mathrm{liq}})}}.
$$
At the critical point the liquid and gas become the same phase, so their entropy discontinuity disappears and
$$
\boxed{L\longrightarrow0}.
$$