A horizontal variation is a shift defined in the ( t, x i ) space or in the ( x i ) space by a smooth vector field φ. The corresponding laws of transport for vector or tensor fields and for vector or tensor measures are investigated. This is used to characterize the (possibly non-smooth) solutions of the dynamical equations of a nonhomogeneous compressible barotropic inviscid fluid, in Euler variables, as the critical points of some real functionals on infinite dimensional manifolds.