找回密码
 立即注册
搜索
查看: 2180|回复: 6

[软件] ipython里怎么显示渲染好的latex公式耶?

[复制链接]
     
发表于 2017-8-15 21:56 | 显示全部楼层 |阅读模式
本帖最后由 糊状物 于 2017-8-15 21:58 编辑
Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from sympy import *

In [2]: x,y=symbols('x,y')

In [25]: Math(latex(diff(asin(x))))
Out[25]: <IPython.core.display.Math object>

In [26]: from IPython.display import Image

In [27]: Image(filename='J:\Adobe Dreamweaver\Dreamweaver\configuration\Commands\insertFGIcons\insert_after_Over.png')
Out[27]: <IPython.core.display.Image object>

In [28]: %%latex
    ...: diff(asin(x))
    ...:
<IPython.core.display.Latex object>

为什么在out那里只显示个<IPython.core.display.Latex object>而不直接把图片显示出来?
回复

使用道具 举报

     
发表于 2017-8-15 23:32 | 显示全部楼层
没试过,好像是要from IPython.display import display
然后要把这个对象传进display里,比如display(diff(asin(x)))这样?貌似是叫display还是display_latex来着
回复

使用道具 举报

发表于 2017-8-15 23:57 | 显示全部楼层
用ipython notebook,现在改名叫jupyter notebook
还有%%latex下面应该写latex的格式吧
回复

使用道具 举报

     
 楼主| 发表于 2017-8-16 00:13 | 显示全部楼层
楼上两位的都不行哎.
回复

使用道具 举报

头像被屏蔽
     
发表于 2017-8-16 01:27 来自手机 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
     
发表于 2017-8-16 14:50 来自手机 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
 楼主| 发表于 2017-8-16 21:13 | 显示全部楼层
跟土拨鼠学qt 发表于 2017-8-16 01:27
用qt console吧

—— 来自 OnePlus ONEPLUS A3000, Android 7.1.1上的 S1Next-鹅版

对,原来就是这个
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|上海互联网违法和不良信息举报中心|网上有害信息举报专区|962110 反电信诈骗|举报电话 021-62035905|Stage1st ( 沪ICP备13020230号-1|沪公网安备 31010702007642号 )

GMT+8, 2025-8-16 11:44 , Processed in 0.045695 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表