The "deluxe" solution is to generate html+css3 (MUCH easier to customize then Latex in my experience) and use princexml to generate pdf documents. We use this solution and it produces very good results. It has MathML support (http://lykt.info/mathml/prince/demo-with-css.pdf). But of course if your primary needs are not styling but math printing, nothing beats Latex.