When running IPython notebook (0.12 or git) with sympy profile, latex representation of higher order roots in the output cell doesn't get rendered. To reproduce the problem, run $ ipython2 notebook --profile=sympy
and then execute
In [6]: a = 3**(S(1)/4) a Out[6]: \root{4}{3} # I should see nicely rendered root here, not LaTex code.
SymPy 0.7.1. is used for this examples. The problem is that sympyprinting extension uses iTex markup instead of regular Latex. Why is that good? Here's the difference in root representation:
In [7]: latex(a) Out[7]: \sqrt[4]{3} # MathJax can render this. In [8]: latex(a, itex=True) Out[8]: \root{4}{3} # MathJax can't render this.
There are two workarounds:
itex=False
in extensions.sympyprinting.print_latex()
, but that will probably break something else, orimport re; s = re.sub(r'\\root\{(.*?)\}\{(.*?)\}', r'\\sqrt[\1]{\2}', s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4