Condensation of hard rods under gravity: exact results in one dimension.