Maybe you need to override this function: https://github.com/sympy/sympy/blob/master/sympy/interactive/printing.py#L90
Notice how some odd classes that don't fit the sympy standards have special cases. Try adding your class to that list and see if it works. Jason moorepants.info +01 530-601-9791 On Tue, Aug 26, 2014 at 6:57 PM, Alan Bromborsky <abro...@verizon.net> wrote: > I am trying to print a list of instances of a custom class. The input is - > > print (o3d.grad, o3d.grad) > > the output is (custom latex printer) > > [image: $$ (e_{x} \frac{\partial}{\partial x} + e_{y} > \frac{\partial}{\partial y} + e_{z} \frac{\partial}{\partial z}, e_{x} > \frac{\partial}{\partial x} + e_{y} \frac{\partial}{\partial y} + e_{z} > \frac{\partial}{\partial z}) $$] > > however in ipyrhon notebook I input > > (o3d.grad, o3d.grad) > > I get out > > (e_{x} \frac{\partial}{\partial x} + e_{y} \frac{\partial}{\partial y} + > e_{z} \frac{\partial}{\partial z}, > e_{x} \frac{\partial}{\partial x} + e_{y} \frac{\partial}{\partial y} + > e_{z} \frac{\partial}{\partial z}) > > Also the standard latex tuple and list printer is not using \left ( > \right and \left [ \right ) to enclose > the tuple or list. How can I write a custom latex tuple and list printer > that will also work in ipython notebook. > > -- > 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 http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/53FD10D1.6080309%40verizon.net > <https://groups.google.com/d/msgid/sympy/53FD10D1.6080309%40verizon.net?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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1AgriAFv0KoeL1ePt0n%3DEEjvpHYE6_2CtwoiX7%2B7%3Dp7hbg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.