Question: how to make latex(1/2) produce a \frac{1}{2} in Maple?

For some reason, Maple does not use \frac{}{} for things like 1/2 that can occur in an expression

restart;
expr:=1/2;
latex(expr);

            1/2

This make the generated code not good looking. For example using this in Maple:

latex(diff(y(x), x)+y(x)*cos(x)-(1/2)*sin(2*x) = 0);

produces this latex when proccessed:

When the latex is put inside a display in the document.  This is terrible. Is there a way to tell Latex to use \frac{}{} for fractions?

 

Please Wait...