On Fri, 13 Jan 2023 at 11:10, Paul Royik <distantjob...@gmail.com> wrote:
>
> Hello.
>
> Is it possible to render cos ^2 (x)- sin ^2 (x) as "cos ^2 (x)- sin ^2 (x)", 
> not "- sin ^2 (x)+cos^2(x)"? I want terms with negative sign be last.
>
> I've discovered that there is def _print_Add(self, expr, order=None):
>
> How should order be specified?

There is an order argument to init_printing but it probably doesn't do
what you want. You can set it to None though and then manually set the
order of the terms in the expression:

In [13]: init_printing(order='none')

In [14]: Add(y, x, evaluate=False)
Out[14]: y + x

--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxQNfHfUqB8bV9x7SMXv1uLapxbXDo95uU3QdufzZOH7-Q%40mail.gmail.com.

Reply via email to