sympy-live
sympy-live copied to clipboard
dir returns unrendered TeX
Sorry if this is the wrong place to report this issue (Might be MathJax?), but running dir() on something (e.g. '') makes it show plain, unrendered, TeX.
dir('') \begin{equation_}\begin{bmatrix}add, & class, & contains, & delattr, & doc, & eq, & format, & ge, & getattribute, & getitem, & getnewargs, & getslice, & gt, & hash, & init, & le, & len, & lt, & mod, & mul, & ne, & new, & reduce, & reduce_ex, & repr, & rmod, & rmul, & setattr, & sizeof, & str, & subclasshook, & _formatter_field_name_split, & formatter_parser, & capitalize, & center, & count, & decode, & encode, & endswith, & expandtabs, & find, & format, & index, & isalnum, & isalpha, & isdigit, & islower, & isspace, & istitle, & isupper, & join, & ljust, & lower, & lstrip, & partition, & replace, & rfind, & rindex, & rjust, & rpartition, & rsplit, & rstrip, & split, & splitlines, & startswith, & strip, & swapcase, & title, & translate, & upper, & zfill\end{bmatrix}\end{equation}
Thanks for reporting it. Looks like a bug.
MathJax doesn't like the unescaped underscores in SymPy Live's LaTeX, so it shows the raw TeX instead. I'm not sure if this is due to how Live is using SymPy's LaTeX printer or if the printer should escape underscores.
Really, we shouldn't use LaTeX to render things that aren't math. There is already logic for this in the ipython printing code.