[IPython-dev] mimetypes from format()

MinRK benjaminrk at gmail.com
Sun Dec 29 13:39:39 EST 2013


If it's a plain terminal session, only the plaintext formatter is enabled
by default, since no other formats are renderable. You probably just want
to set `display_formatter.formatters['text/latex'].enabled = True`.


On Sun, Dec 29, 2013 at 9:36 AM, Jason Moore <moorepants at gmail.com> wrote:

> I'm having trouble figuring out how to get the DisplayFormatter to return
> the latex representation, in particular the format function seems to be
> able to return many mimetypes:
> http://ipython.org/ipython-doc/dev/api/generated/IPython.core.formatters.html#IPython.core.formatters.DisplayFormatter.format
>
> I'm writing this test:
>
>
> https://github.com/moorepants/sympy/blob/b748fae55c2cc3e973340b5e85cadd83a80f3405/sympy/interactive/tests/test_ipythonprinting.py#L59
>
> And want to verify that the 'text/plain' and 'text/latex' function as
> expected after changing settings in SymPy. I can only get the 'text/plain'
> to output from 'format()'.
>
> How do I output other mimetypes?
> Jason
> moorepants.info
> +01 530-601-9791
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131229/15bf440f/attachment.html>


More information about the IPython-dev mailing list