I have several polynomials in variables p and q, each term in which has total degree n, a constant. I would like to output the polynomial in increasing powers of p (and hence decreasing powers of q), and within each term I would like the factors to be in alphabetical order, i.e. the power of p followed by the power of q.
For example, I would like 2p q + p^2 to be displayed exactly like that. (Or preferably, with the powers as superscripts, but this is not so important.)
Everything I try yields p^2 + 2p q instead. I have tried TraditionalForm, PolynomialForm, and these answers:
I am using Mathematica version 9.