Custom environment not working (4.0.0-beta7)
Issue Summary
I have a custom environment defined (divmatrix) to write matrices with a divider in my webpage. This is what I want to achieve:
\left(\begin{array}{ccc|c}
% content
\end{array}\right)
This is how I have defined the environment:
divmatrix: ["\\left(\\begin{array}{ccc|c}", "\\end{array}\\right)"]
This is how I'm using it:
A= \begin{divmatrix}
2 & 0 & 0 & -3 \\
3 & -1 & 0 & 2 \\
-1 & 3 & 5 & -2
\end{divmatrix}
It was working correctly when I was using MathJax 3.2.2. However, the following error appeared when I upgraded to version 4.0.0-beta7: \begin{divmatrix} ended with \end{array}.
Technical details:
- MathJax Version: 4.0.0-beta7
- Client OS: Windows 11
- Browser: Firefox 138
MathJax configuration:
MathJax = {
tex: {
inlineMath: [["$", "$"]],
environments: {
divmatrix: ["\\left(\\begin{array}{ccc|c}", "\\end{array}\\right)"]
}
};
Loading MathJax via:
<script async src="https://cdn.jsdelivr.net/npm/[email protected]/tex-mml-chtml.js"></script>
This is a duplicate of mathjax/MathJax-src#1137, which is fixed in mathjax/MathJax-src#1139. It has been merged into develop, but is not yet in a release. We are readying beta.8, and it will be available there.
I will put a patch together for you tomorrow.
Oh, that's why I didn't find any similar open issue. Don't worry about the patch, I can wait for beta.8 and I don't want to take up your time.
Thank you so much for your work!
It's working in MathJax 4.0.0-rc4, thanks!
Thanks for the confirmation.