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:
How to reorder and combine terms in a polynomial with multi-variables?
How do I disable that Mathematica orders terms in lexicographic order?
How to simplify a polynomial and get the results in the order that I want?
How can I reorder the factors in the terms of a polynomial?
I am using Mathematica version 9.