(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
--
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+un...@googlegroups.com.
To post to this group, send email to sy...@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.
For more options, visit https://groups.google.com/d/optout.
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)
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.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1AgriAFv0KoeL1ePt0n%3DEEjvpHYE6_2CtwoiX7%2B7%3Dp7hbg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/53FD212F.6090802%40verizon.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6KkuzhJY-s5AGkjJ0DyXk6F3XC4QNkKwMNcpO66ecic0A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/53FD244E.7050900%40verizon.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1AjYExHn0B_D6Rw_1y4cS%3DkhVf9Lkv2U8D-_4t0r8Wf%2Bdw%40mail.gmail.com.
I looked at the TableForm class in sympy/printing/tabelform.py and have several questions relating to _latex(self,printer).
1. In order to handle text and latex printing in a unified manner is _sympystr(self, p) the text equivalent of _latex(self,printer)
.
2. I wish to have both a latex and string printer for my Dop (differential operator) class. Currently I have custom printers GaPrinter for
text and GaLatexPrinter for latex. Members of my Dop class is Dop_latex_str(self) which generates the latex string for a Dop and
Dop_str(self) which generates the text string for a Dop. In the GaLatexPrinter class I have the member
def _print_Dop(self, expr):
return expr.Dop_latex_str()
and in the GaPrinter class the member
def _print_Dop(self, expr):
return expr.Dop_str()
Should I redefine Dop_latex_str(self) as _latex(self,printer) and Dop_str(self) as _sympystr(self, printer)?
3. If I define _latex(self,printer) and _sympystr(self, printer) do I need _print_Dop(self, expr) in the GaLatexPrinter and GaPrinter classes?
4. Are the only members I need in the custom printer classes the ones that are overriding the ones in the default printer classes such as
_print_Derivative(self, expr) and _print_Function(self, expr)?
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/53FDD8D0.7000107%40verizon.net.