I have custom latex printing working for galgebra in "ipython notebook",
but it does not work in "ipython qtconsole" (latex printing of sympy
classes does work). When I try to print latex in qtconsole the ascii
expression for the latex is displayed. When using qtconsole should
something different be returned from _repr_latex_(self) for each class
that what is returned for notebook (what I am returning for notebook is
a latex ascii string).
My code for multivectors is -
def _repr_latex_(self):
latex_str = printer.GaLatexPrinter.latex(self)
if r'\begin{align*}' not in latex_str:
if self.title is None:
latex_str = r'\begin{equation*} ' + latex_str + r'
\end{equation*}'
else:
latex_str = r'\begin{equation*} ' + self.title + ' = '
+ latex_str + r' \end{equation*}'
else:
if self.title is not None:
latex_str = latex_str.replace('&',' ' + self.title + '
=&',1)
return latex_str
and this works in notebook.
Note that I am running python 2.7 on ubuntu 14.04 and have complete
texlive installed.
--
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/547F902E.7010507%40verizon.net.
For more options, visit https://groups.google.com/d/optout.