I don't think the printing order and the args order are the same in
general. You should create a custom latex printer subclass with a custom
_print_Add.

Aaron Meurer

On Fri, Jul 8, 2016 at 5:22 PM, Björn Dahlgren <[email protected]> wrote:

>
>
> On Friday, 8 July 2016 21:53:38 UTC+2, Aaron Meurer wrote:
>>
>> Isn't just a question of picking a nonnegative term to go first?
>>
>
> Yes (I have some other ideas regarding optimizing the printed width of an
> equation too but let's skip that for now).
> But how would I go about doing so? the `.args` attribute cannot be
> modified since it is immutable, and this doesn't help:
>
> >>> Add(y, -x, evaluate=False)
> -x + y
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/abf6ec60-332e-48bf-90c4-4aa48c015f5f%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/abf6ec60-332e-48bf-90c4-4aa48c015f5f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bi4x1U%2BKTm9pnrZVPU06zpvyN1VZRQRQPxj1SKRfUvyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to