For any configuration of a static plane-symmetric distribution of matter along spacetime, there are coordinates where the metric can be put explicitly as a functional of the energy density and pressures. It satisfies Einstein equations as far as we require the conservation of the energy-momentum tensor, which is the single ODE for selfgravitating hydrostatic equilibrium. As a direct application, a general solution is given when the pressures are linearly related to the energy density, recovering, as special cases, most of known solutions of static plane-symmetric Einstein equations.