The qtconsole uses matplotlib to generate latex, which supports a more
limited set of latex (in particular, I don't think it supported
\begin).

Aaron Meurer

On Wed, Dec 3, 2014 at 4:35 PM, Alan Bromborsky <[email protected]> wrote:
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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.

-- 
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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6Jkyyv6i44KLg1KvF6KCpta0Yt6V3UDCok2OPjT%3Dsx31w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to