In general, I'd say the two ought to produce the same result, unless
there is some formatting thing that is not possible to do in Unicode
but is in LaTeX.

I've noticed that the LaTeX printer and the pretty printer have
different methods for computing parenthesization (the LaTeX method
seems to be better). This is likely the cause of this. We should unify
the two.

Aaron Meurer

On Thu, Mar 31, 2016 at 9:33 AM, Gaurav Dhingra <axyd0...@gmail.com> wrote:
>
> Hi, everyone.
> One general question of `printing` and `latex`
>
>>>> init_printing()
>>>> Derivative(x**2, x)      ###  1
> d ⎛ 2⎞
> ──⎝x ⎠
> dx
>
>>>> latex(Derivative(x**2, x))   ### 2
> \frac{d}{d x} x^{2}
>
>
> Here the `latex` (i.e 2nd) printing is not the corresponding printing of 1st
> printing using Unicode, since the `latex` printing doesn't contain brackets
> around `x**2`, while first printing does contain.
>
> So is it okay to have such a non-reciprocity behaviour (in general)?
>
> Gaurav Dhingra (gxyd)
>
> --
> 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 post to this group, send email to sympy@googlegroups.com.
> 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/9adf0b8f-e9b2-49bf-9995-fcb2e4152f9b%40googlegroups.com.
> 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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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%2BXi_%2BG7YS%3DeF-HAOjO1_%2BGkWaYcqaDLyGkUXjeCUESiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to