Comments (5)
OK, I tracked this down. First recall that the definition of \eqno
that is in use by IEEE is essentially
\def\eqno#1{\tag*{$#1$}}
which was the solution I proposed for them in the discussion we had earlier.
The problem is that the \eqno
uses dollar sign delimiters, and that interacts badly with the dollar signs in the \hbox
. That is, after the macro replacement, the text is
\tag*{$\hbox{(6$^\prime$)}$}
and so the inner dollar signs cause the contents of the \tag
to have two math blocks, \hbox{(6
and )}
, both of which have unbalanced braces.
One possible solution would be to use
\def\eqn#1{\tag*{\(# 1\)}} % space added between # and 1 to prevent autolink to issue 1
instead, so that it uses the alternative math delimiters \(...\)
which won't interfere with the inner ones (unless the inner \hbox
uses \(...\)
as well). Unfortunately there is a problem: a bug in MathJax fails to properly handle the nesting of \(\hbox{$...$}\)
. It is easily fixed, and I'll make a test branch for the fix shortly, but it's not in the current version, so this redefinition won't work until the bug is fixed. Sigh.
Davide
from mathjax.
OK, I've put my fix for the nesting problem into the issue36 branch of my fork of MathJax for review. The issue was that when a \(
delimiter is found and is followed by a $
before the closing \)
was found, the matching was switched to the $
rather than continuing to search for \)
.
This still won't handle the SAME delimiters being nested, but that really shouldn't be occurring anyway.
Davide
from mathjax.
Is the following a correct reduced testcase?
\( \hbox{6$^\prime$} \)
from mathjax.
No, it would need to be
$$\hbox{\(\hbox{6$^\prime$}\)}$$
The nesting problem was when looking for math inside text-mode inside math-mode. It is not a problem with tex2jax
, but rather with the treatment of text-mode inside math-mode.
Davide
from mathjax.
OK, thanks.
I've added a reftest
LaTeXToMathML/missing-brace-1.html
==> In testsuite
from mathjax.
Related Issues (20)
- Does MathJax v3 support explicitly set line breaking? HOT 3
- Primes don't work properly with class OP in TeX input
- Unicode multiplication sign not a binary operator HOT 2
- Two equals Element with different index don't permit callback of the first invocated HOT 3
- Consider supporting Noto Sans Math in MathJax 4 HOT 3
- Problem in displaying parentheses in formula HOT 1
- MathJax.tex2chtml is not a function HOT 1
- Enclosing parentheses should be equivalent to <mfenced></mfenced> tags HOT 10
- Why display and MathJax equation source do not match? HOT 3
- Latex comment after "\end{equation}" ignored. HOT 1
- MJ4-beta.4: \_ in math mode yields error, not underscore character. Is that expected? HOT 2
- Review security report HOT 2
- MJ4: \mskip\thickmuskip yields typesetting error HOT 2
- Display problem Norm (mathematics) HOT 2
- How to allow context menu to show in version 3.2.2 ? HOT 2
- `[]` rendered improperly in `aligned` environment HOT 1
- [v4.beta4] unexpected TeX parser crash (regression from beta3) HOT 4
- How to define \symrm in Mathjax 2.7 HOT 3
- Change MathJax version 2.7.9 to 3.2.2 HOT 2
- Axe test: Ensures elements with an ARIA role that require child roles contain them HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathjax.