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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@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/b5a31085-9549-4cce-915a-5cf060bf2ee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c0e81423-650b-42c7-b50b-8255e67cb28b%40googlegroups.com.
'm \\mathcal{F} W \\Sigma_{k} W^\\dag \\mathcal{F}^\\dag m^\\dag'If I do:
tmp = CustomLatexPrinter()
tmp.doprint(Sigmax)
The result is:
'm \\mathcal{F} W \\Sigma_{k} W^H \\mathcal{F}^H m^H'
--
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/bd7962ee-edd1-4d9e-af36-b3537f99055a%40googlegroups.com.
That will not work if I want to use it in an interactive session. There I need the actual latex function overloaded since that is what it seems to call. Is there a way to do 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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@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/2b5347c3-8ebb-41b2-83d2-ead33860c6e7%40googlegroups.com.
Great. That worked:import sympyfrom sympy.printing.latex import LatexPrinterclass CustomLatexPrinter(LatexPrinter):def _print_Adjoint(self, expr):mat = expr.argfrom sympy.matrices import MatrixSymbolif not isinstance(mat, MatrixSymbol):return r"\left(%s\right)^H" % self._print(mat)else:return "%s^H" % self._print(mat)def my_latex(expr, **settings):return CustomLatexPrinter(settings).doprint(expr)sympy.init_printing(latex_printer=my_latex)One remaining question. init_session() does not seem to accept the latex_printer argument. Is it passed in some other argument?
--
On Sunday, January 31, 2016 at 11:06:52 PM UTC-5, Jason Moore wrote:You can pass in the custom latex printer to init_printing or init_session as a kwarg.JasonOn Sun, Jan 31, 2016 at 7:30 PM, Michael Hansen <michael.sch...@gmail.com> wrote:That will not work if I want to use it in an interactive session. There I need the actual latex function overloaded since that is what it seems to call. Is there a way to do 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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@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/2b5347c3-8ebb-41b2-83d2-ead33860c6e7%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+un...@googlegroups.com.
To post to this group, send email to sy...@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/fb250bd4-5771-4b02-b84c-d812d4744e00%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8212abb7-fa00-46da-aac9-8fb89fd48f41%40googlegroups.com.