Can you please paste your full code that checks whether this works?
Jason moorepants.info +01 530-601-9791 On Sun, Jan 31, 2016 at 5:31 PM, Michael Hansen < [email protected]> wrote: > Based on the manual I did something like: > > import sympy > from sympy.printing.latex import LatexPrinter > > class CustomLatexPrinter(LatexPrinter): > def _print_Adjoint(self, expr): > mat = expr.arg > from sympy.matrices import MatrixSymbol > if not isinstance(mat, MatrixSymbol): > return r"\left(%s\right)^H" % self._print(mat) > else: > return "%s^H" % self._print(mat) > > > sympy.Basic.__str__ = lambda self: CustomLatexPrinter().doprint(self) > sympy.init_session() > > > But that doesn't really change it. How exactly do I overload the > LatexPrinter? > > On Sunday, January 31, 2016 at 7:55:41 PM UTC-5, Jason Moore wrote: >> >> You can subclass the LatexPrinter and modify the method that controls the >> adjoint printing to your liking. >> >> See http://docs.sympy.org/dev/modules/printing.html for an example. >> >> >> Jason >> moorepants.info >> +01 530-601-9791 >> >> On Sun, Jan 31, 2016 at 12:01 PM, Michael Hansen < >> [email protected]> wrote: >> >>> Quick question. Is there a way to change what symbols are used for >>> things like adjoint for a matrix. In latex, it is currently \dagger but I >>> would rather use "H" or something like that. >>> >>> -- >>> 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/b5a31085-9549-4cce-915a-5cf060bf2ee5%40googlegroups.com >>> <https://groups.google.com/d/msgid/sympy/b5a31085-9549-4cce-915a-5cf060bf2ee5%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/c0e81423-650b-42c7-b50b-8255e67cb28b%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/c0e81423-650b-42c7-b50b-8255e67cb28b%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/CAP7f1AjHOPz9w5kzKJPqt-6x%2BkD%2BqX7bvUf_xiLme-yUi3oGTg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
