Skip to content

Mathjax blocks are not highlighted correctly in 4.2.2 #1733

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

Closed
randy3k opened this issue Sep 2, 2016 · 4 comments
Closed

Mathjax blocks are not highlighted correctly in 4.2.2 #1733

randy3k opened this issue Sep 2, 2016 · 4 comments

Comments

@randy3k
Copy link

randy3k commented Sep 2, 2016

The math equations inside $$ $$ are not highlighted.

screen shot 2016-09-02 at 2 08 41 pm

By interestingly, \[ \] is highlighted but not rendered.

screen shot 2016-09-02 at 2 10 03 pm

screen shot 2016-09-02 at 2 10 16 pm

The version of the notebook server is 4.2.2 and is running on:
Python 3.5.2 | packaged by conda-forge | (default, Jul 26 2016, 01:32:08)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]

@mpacer
Copy link
Member

mpacer commented Sep 2, 2016

This is probably related to differences between the code mirror lexer and the underlying JSON parser:

Code mirror probably expects standard LaTeX formatting, which \[…\] is(technically you aren't supposed to use $$…$$ if you're writing LaTeX as it is a classic TeX command that has nonstandard spacing… which I'm guessing has been explicitly excluded from activating highlighting for that reason.)

However js sees \[ as just escaping the [ so it won't render, but \\[ … \\]will. I guess this would qualify as a bug but I don't know if the place to fix it is on the Jupyter end… it might be I'm just not sure.

@randy3k
Copy link
Author

randy3k commented Sep 2, 2016

If I am correct, Mathjax uses $$ ... $$ in default.

@gnestor
Copy link
Contributor

gnestor commented Sep 12, 2016

#1757 fixes an issue regarding CodeMirror config for text (markdown and raw) cells. I've tested and syntax highlighting is working for math inside of $ brackets but still not for $$ brackets. The question is: was highlighting of math inside of $$ brackets ever supported? @minrk Do you know?

@RRosio
Copy link
Collaborator

RRosio commented Jun 29, 2022

Hello, I'm closing this issue as it has had no updates in the last 365 days. Please feel free to reopen this issue if it still needs to be addressed. Thank you!

@RRosio RRosio closed this as completed Jun 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants