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

Space between \begin or \end and the following brace #2494

Closed
bdtc opened this issue Aug 8, 2020 · 3 comments
Closed

Space between \begin or \end and the following brace #2494

bdtc opened this issue Aug 8, 2020 · 3 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Milestone

Comments

@bdtc
Copy link

bdtc commented Aug 8, 2020

Issue Summary

If a space is included after \begin or \end and the following brace, the environment is not rendered.

Ex. \begin{equation} works, but \begin {equation} does not.

(I didn't see this addressed in the docs or in previous Github issues.)

Supporting information:

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />

<script
         id="MathJax-script"
         src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
></script>

</head>
<body>

<p>
No spaces:
</p>

\begin{equation}
y=mx+b
\end{equation}

<p>
Space after begin:
</p>

\begin {equation}
y=mx+b
\end{equation}

<p>
Space after end:
</p>

\begin{equation}
y=mx+b
\end {equation}
</body>
</html>
@dpvc dpvc added Accepted Issue has been reproduced by MathJax team v3 labels Aug 8, 2020
@dpvc
Copy link
Member

dpvc commented Aug 8, 2020

You are correct, the search pattern for the \begin command doesn't include spaces. I will look into fixing that.

@dpvc
Copy link
Member

dpvc commented Aug 10, 2020

I have made a PR to resolve the issue. Thanks for the report!

dpvc added a commit to mathjax/MathJax-src that referenced this issue Aug 17, 2020
Allow spaces after \begin, \end, and \ref when finding math delimiters. (mathjax/MathJax#2494)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Aug 17, 2020
@dpvc dpvc added this to the 3.1.0 milestone Aug 25, 2020
@dpvc dpvc added Fixed v3.1 and removed Merged Merged into develop branch labels Aug 25, 2020
@dpvc
Copy link
Member

dpvc commented Aug 25, 2020

Fixed in v3.1 released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.1
Projects
None yet
Development

No branches or pull requests

2 participants