You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sympy
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.
Aaron Meurer
unread,
Dec 5, 2014, 4:16:01 PM12/5/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
The qtconsole uses matplotlib to generate latex, which supports a more
limited set of latex (in particular, I don't think it supported
\begin).