Previously, SageMath’s show() function rendered LaTeX math formulas
correctly in Cursor’s Jupyter notebook. After a recent update, it now
displays raw HTML source instead of rendered math.
Thanks for the info. In one case it shows raw LaTeX, and in the other it renders correctly.
Since you can reproduce it in regular VS Code too, this is most likely a bug in Microsoft’s Jupyter extension, not Cursor itself. The fact that Developer: Reload Window fixes it temporarily points to a race condition during renderer startup.
A few things to try:
Update the Jupyter extension to the latest version (or try the pre-release). Sometimes the fix is already there.
Check if it happens with a normal Python kernel (not SageMath), for example:
from IPython.display import display, Math
display(Math(r'\sqrt{x^2 + 1}'))
If it only happens with the SageMath kernel and normal Python is fine, then it’s likely a bug in the SageMath + Jupyter extension combo. In that case, it’s worth reporting it in the VS Code Jupyter extension repo: GitHub · Where software is built