>
> This command prints \sin(x)^2 
> Is there a correct way to modify the command to obtain 
> \sin^2(x) instead ?
>
> Thx
>

Hi!  While it's true that this syntax is the common shorthand we use, it 
would be quite challenging to change printing or LaTeXing to make this 
happen if and only if you really wanted it.  Sage isn't checking when it 
does powers whether the thing being raised to a power is a single trig 
function or not.  Ordinarily one might be able to do a custom LaTeX thing, 
but this is not a single function.

At a more advanced level, you could probably write your own expression tree 
parser to recognize such situations; I am not an expert on such things but 
it would be doable.  But I wouldn't want to try to guarantee that it would 
only give the "right" thing in the situations you want it (e.g., 
distribution, non-integer powers, powers that are functions...)  If you are 
successful, though, it would be interesting as an alternate print option!

Good luck,
- kcrisman

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to