【发布时间】:2020-07-25 21:17:05
【问题描述】:
我在 Colab 中使用过 sympy。在我将在 StackOverflow 中找到的代码放入后,它给了我一个很好的打印结果......
from sympy import init_printing
def custom_latex_printer(exp,**options):
from google.colab.output._publish import javascript
url = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=default"
javascript(url=url)
return sympy.printing.latex(exp,**options)
init_printing(use_latex="mathjax",latex_printer=custom_latex_printer)
但是很遗憾,从昨天开始,我无法获得渲染输出??
请告诉我任何建议??
【问题讨论】:
-
你有输出吗?让我们知道发生了什么。
标签: python sympy google-colaboratory mathjax