Text this: A general formalism for phase space calculations /