Thanks Jonathan for the explanation. But I am not pointing out this
behavior here. Part of the (multi-line) bracket goes to the right of the
unit vector k_C in the last expression, which is a display bug specific to
pretty print in the terminal.

Unfortunately the entire expression gets jumbled on the mobile. To see this
problem please view the mail in a browser so that proper formatting is
visible.

Best wishes,
Rajeev


On Wed, 9 Feb 2022, 7:30 p.m. [email protected], <[email protected]> wrote:

> Rajeev,
> If I understand correctly, you are worried about the way functions,
> factors and symbols are ordered in an evaluated expression. Your example is
> the expected behavior. When an expression is evaluated, sympy has to decide
> how to order the symbols. The default ordering is alphabetical. With
> capital letters first. For example if I set p = n*R*T/V (ideal gas law) the
> display of the value of p will return: RTn/V as the sorting is done within
> the parts of the expression (numerator and denominator). I believe there
> are some options for adjusting this, but others will have to speak to that.
>
> Jonathan
>
> On Tuesday, February 8, 2022 at 11:01:23 PM UTC-6 Rajeev wrote:
>
>> Dear group,
>>
>> One more point in this context. Things work fine for unevaluated
>> expressions -
>>
>> vecE = (1/eps) * Integral(delop.cross(vecH), t)
>>
>> \vec{E} = ⎛     ⌠                         ⎞
>>           ⎜     ⎮      ⎛x_C⎞    ⎛  4  ⎞   ⎟ k_C
>>           ⎜     ⎮ 4⋅cos⎜───⎟⋅cos⎝10 ⋅t⎠   ⎟
>>           ⎜     ⎮      ⎜  2⎟              ⎟
>>           ⎜  11 ⎮      ⎝10 ⎠              ⎟
>>           ⎜10  ⋅⎮ ───────────────────── dt⎟
>>           ⎜     ⎮           10            ⎟
>>           ⎝     ⌡                         ⎠
>>
>>
>>
>> vecE.doit()
>>
>> \vec{E} = ⎛    6    ⎛  4  ⎞    ⎛x_C⎞⎞
>>           ⎜4⋅10 ⋅sin⎝10 ⋅t⎠⋅cos⎜───⎟ k_C⎟
>>           ⎜                    ⎜  2⎟⎟
>>           ⎝                    ⎝10 ⎠⎠
>>
>>
>> I hope this would help to find the issue.
>>
>> Best wishes,
>> Rajeev
>>
>>
>> On Wed, 9 Feb 2022 at 09:34, Rajeev Singh <[email protected]> wrote:
>>
>>> Thanks Alan and Aaron,
>>>
>>> I will go through galgebra and latex options carefully to get nicer
>>> looking output. Thanks again for the suggestions.
>>>
>>> Best wishes,
>>> Rajeev
>>>
>>>
>>> On Wed, 9 Feb 2022, 5:53 a.m. Aaron Meurer, <[email protected]> wrote:
>>>
>>>> The min and max parameters to latex() control when a float is printed
>>>> in scientific format. The sstr printer also has the same options, but
>>>> it looks like the pretty printer does not (it should not be hard to
>>>> add them, though).
>>>>
>>>> Aaron Meurer
>>>>
>>>> On Mon, Feb 7, 2022 at 3:55 AM Rajeev Singh <[email protected]> wrote:
>>>> >
>>>> > Dear group,
>>>> >
>>>> > What would be the best way to get numbers in the form 10^{...} while
>>>> > using pretty print or latex? The following hack works -
>>>> >
>>>> > ten = symbols("10", positive=True)
>>>> > eps, mu = 4*pi*ten**(-11), ten**(-5)
>>>> >
>>>> > but is messing up pretty print when used with sympy.vector objects.
>>>> > Couldn't find anything on this in the mail archives.
>>>> >
>>>> > Best wishes,
>>>> > Rajeev
>>>> >
>>>> > --
>>>> > 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/sympy/CAABz-z-jD3GPB3jw0q%3D4xuG0VCmcw4NO8154H3CRYJz4Ws2Tpw%40mail.gmail.com
>>>> .
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/sympy/CAKgW%3D6LVuxsPwieY1y_%3D4ymQcZ%2B4fYN6vqrWCQGNsfB%3Duk9_4w%40mail.gmail.com
>>>> .
>>>>
>>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/9d6ac046-d219-4e22-84be-b996d6b497c4n%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/9d6ac046-d219-4e22-84be-b996d6b497c4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAABz-z9GdcSpANx49foQnoFwxXgvhWip4EzQDANh%2BYFQjvkvrw%40mail.gmail.com.

Reply via email to