Question: improvements in Latex for trig(x)^n expressions

When Maple converts sin(x)^n to Latex, the result remain  sin(x)^n.  But in Mathematical typesetting, this is normally written as sin^n(x).   Ofcourse this is only for Latex. In Maple code this not valid.

Is it possible to change Maple's Latex to make it do this automatically? Mathematica does this automatically. Here is an example

            \sin \left(x \right)^{3}+\cos \left(3 x \right)^{5}

Which when compiled gives

Compare to Latex generated by Mathematica

Which compiles to 

Which is more standard in books and papers, than Maple's version.

Both Maple's Physics:-Latex and latex() command do the same thing.

Is there a way to make it generate the improved version for latex?

Maple 2020.1



Please Wait...