ipython里怎么显示渲染好的latex公式耶?
本帖最后由 糊状物 于 2017-8-15 21:58 编辑Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul5 2016, 11:41:13)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In : from sympy import *
In : x,y=symbols('x,y')
In : Math(latex(diff(asin(x))))
Out: <IPython.core.display.Math object>
In : from IPython.display import Image
In : Image(filename='J:\Adobe Dreamweaver\Dreamweaver\configuration\Commands\insertFGIcons\insert_after_Over.png')
Out: <IPython.core.display.Image object>
In : %%latex
...: diff(asin(x))
...:
<IPython.core.display.Latex object>
为什么在out那里只显示个<IPython.core.display.Latex object>而不直接把图片显示出来?
没试过,好像是要from IPython.display import display
然后要把这个对象传进display里,比如display(diff(asin(x)))这样?貌似是叫display还是display_latex来着 用ipython notebook,现在改名叫jupyter notebook
还有%%latex下面应该写latex的格式吧
https://i.loli.net/2017/08/15/599319f7bf9f7.png 楼上两位的都不行哎. 跟土拨鼠学qt 发表于 2017-8-16 01:27
用qt console吧
—— 来自 OnePlus ONEPLUS A3000, Android 7.1.1上的 S1Next-鹅版
对,原来就是这个
页:
[1]