Open sonulohani opened 4 years ago
Thanks for opening this issue, @sonulohani!
Indeed, MathJax rendering has been a cumbersome bug for a few months now. My immediate notes on the problem:
Tagging this issue as new-contributor-friendly since it is localized enough to require a small change.
Do you mind sharing the notebook you used in the examples above for verification?
Here is the python notebook which you can use to check
@captainsafia Are you guys working on the fix. The bug nteract/nteract#2924 you closed was opened 2 years back.
The issue referenced above isn't an exact duplicate of this one but is kept as a reference.
To clarify, rendering of math works using the @nteract/mathjax
package as seen below:
The new seems to after LaTeX within markdown files or anywhere where the @nteract/mathjax
library is used.
We did some work a couple of years ago to introduce the MathJax library. This regression is separate from the issues above (but perhaps related).
nteract is volunteer-based so there's not time to address everything on the backlog but we'll let you know once this makes it onto one of the monthly release milestones. Thanks for your patience!
@sonulohani I was able to get the formula in your example to render in a markdown cell by placing the formula on a new line.
@captainsafia I think this may be more about how the markdown rendering works than a MathJax issue. Markdown is expecting a blank line in order to render the formula.
@sonulohani I was able to get the formula in your example to render in a markdown cell by placing the formula on a new line.
@captainsafia I think this may be more about how the markdown rendering works than a MathJax issue. Markdown is expecting a blank line in order to render the formula.
If the example works in Jupyter notebook regardless of adding new line or not, then it should work with nteract also. Anyway thanks for your findings. This will help devs to fix the issue more sooner.
Here is another ipynb markdown for testing:-
Thank you, @willingc, for the observation. After creating multiple use cases for how the formula can be used and testing it here, I found that the regex we are using is working.
However, It doesn't work when the formula is inside HTML tags and when it is in the new line with space at the beginning. The same is demonstrated below.
It works in the jupyter notebook and jupyter lab, but when it's in the new line with space at the beginning, it doesn't work for it either.
I will look into over the weekend.
Application or Package Used VS code
Describe the bug The section $y^{pred}= \text{[0 if y_score < 0.5 else 1]}$ didn't get interpreted properly in VSCode however I can see this properly interpreted in the Jupyter notebook in the browser. Please visit this link for more info:- VSCode Python Extension bug
To Reproduce Steps to reproduce the behavior: