Skip to content
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

Add \[ \] and \( \) as maths delimiters #1935

Closed
wants to merge 1 commit into from

Conversation

jfbercher
Copy link

As mentioned in nbconvert/#477 and earlier in notebook#759, \[ \] and \( \) are not recognized as maths delimiters, and the equations not correctly displayed.
This is not intuitive for LaTeX users (as it is now the recommended way to delimit maths) and causes problems when converting to eg html since the contents of those maths blocks is considered as markdown.
The PR attempt to solve that by updating mathjaxutils.js

  • the regex MATHSPLIT is updated to account for these new delimiters
  • new start/end delimiters are matched

@takluyver
Copy link
Member

I'm inclined to say sorry, but no to further additions to Markdown syntax, even if they're now the recommended way to delimit maths in Latex. The more special exceptions we add to Markdown parsing, the messier it gets.

@rgbkrk
Copy link
Member

rgbkrk commented Dec 4, 2016

Thank you for taking the time to make a pull request.

The primary reason we can't support \[ is that it is valid Markdown/CommonMark for an escaped bracket.

As written by @jgm:

...the problem with that syntax is that \[ and \( already have clearly defined meanings: they are escaped [ and ( characters, and it is very important that there be a way to escape these characters in certain circumstances.

We all want to support mathematics typesetting. For jupyter maintainers and operators of notebook server deployments, we can't support extensions to the syntax that are unambiguous. This does mean having to wait it out for others to solve within CommonMark or getting involved there.

@rgbkrk
Copy link
Member

rgbkrk commented Dec 4, 2016

All that being said, it's worth looking at

\[ \] and \( \) are not recognized as maths delimiters, and the equations not correctly displayed.

as a usability issue where the notebook could detect likely LaTeX and provide a notification/suggestion to use $$ and $. I'm not volunteering to write that though. 😉

@jfbercher jfbercher closed this Dec 4, 2016
@Carreau Carreau modified the milestone: no action Dec 8, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants