Skip to content

string in double $ will convert to MathJax when using pandas Dataframe #2444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
176coding opened this issue Apr 25, 2017 · 3 comments
Open

Comments

@176coding
Copy link

176coding commented Apr 25, 2017

string in double $ will convert to MathJax when using pandas Dataframe, just as the image show:
qq 20170427110005

my df contains string 'from $100 some string here $1000', but when I show it in notebook, it will convert to MathJax and the font has changed

@gnestor
Copy link
Contributor

gnestor commented Apr 25, 2017

@mpacer Any thoughts?

@mpacer
Copy link
Member

mpacer commented Apr 25, 2017

Hmmm… That's why there's supposed to be a rule around mathjax that you don't treat \s$\d as a ending delimiter.

I can confirm that this is also present in markdown cells. The simplest solution is to just escape the $ with \$ so that it would be written as 'from \$100 to \$1000'.

But this shouldn't be happening regardless. It's likely related to how delimiters are specified… this goes back to at least 4.0 so I don't think it was recently introduced.

However fixing this is probably going to break people's notebooks because it will be enforcing a stricter approach to parsing mathjax which other people may have been relying on.

@gnestor
Copy link
Contributor

gnestor commented Apr 25, 2017

Would this require a fix in notebook? Or mathjax? Or ipython?

It would be nice if we could fix this and display a warning in the output for cases like this one where the user may be trying to display math using slightly unexpected delimiters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants