Comments (6)
Not quite a rendering but rather a conversion issue -- the generated MathML is
<math>
<mstyle mathcolor="blue" fontfamily="serif" displaystyle="true">
<mrow>
<mo>{</mo>
<mi>w</mi>
<mrow>
<mo>|</mo>
<mi>w</mi>
<mo>∈</mo>
<msup>
<mrow>
<mo>{</mo>
<mi>a</mi>
<mo>,</mo>
<mi>b</mi>
<mo>}</mo>
</mrow>
<mo>+</mo>
</msup>
<mo>,</mo>
<mo>|</mo>
</mrow>
<mi>w</mi>
<mrow>
<mo>|</mo>
<mo>_</mo>
<mi>a</mi>
<mo>=</mo>
<mo>|</mo>
</mrow>
<mi>w</mi>
<msub>
<mrow>
<mo>|</mo>
</mrow>
<mi>b</mi>
</msub>
<mo>}</mo>
</mrow>
</mstyle>
</math>
which seems wrong. The matching of the |
seems to be the problem.
from asciimathml.
Peter is right, the problem is that AsciiMath matches the |
that you are using as "such that" with the first one for the absolute values.
One way to prevent that is to put the initial |
into invisible delimiters, so that it won't match anything. E.g.
{w {:|:} w in {a, b}^+, |w|_a = |w|_b}
from asciimathml.
Yeah, sadly the absolute value / "such that" handling in AsciiMath is a bit ambiguous, due to the ambiguous nature of the notation itself. I've been thinking about it off and on for years, and I still haven't come up with any ideas for how to better parse an expression like that.
Recently we added functionality that causes abs(x) to be rendered as |x|, and that provides a way to avoid the mismatched symbol issue. But that change hasn't made it into MathJax yet.
from asciimathml.
@drlippman you wrote
Recently we added functionality that causes abs(x) to be rendered as |x|, and that provides a way to avoid the mismatched symbol issue. But that change hasn't made it into MathJax yet.
Ah! When did that happen? We should think about a workflow to pull in such updates. Darn, we could have done that with 2.4 recently...
from asciimathml.
It happened in March. Peter made several changes. There are a couple others I still haven't gotten around to committing. Hopefully we can figure a process and get them into 2.5 :)
from asciimathml.
Thanks, @drlippman . I've created an issue on MathJax's issue tracker to keep track of this. Moving forward, it might make sense to add release tags to this repository and simply post an issue on our thread with each release. It would also be very helpful to add tests to the MathJax test suite for new features and bug fixes.
from asciimathml.
Related Issues (20)
- Inconsistent whitespace sensitivity with numbers HOT 3
- Test environment 'collapses' multiple kinds of whitespace into one HOT 1
- Support more geometry symbols HOT 1
- Support physical units HOT 2
- Vec() crashes updater HOT 1
- An exception occurs when using parseMath!The attribute "mathvariant" is incorrect! HOT 1
- TextMate grammar
- Add ≢ HOT 2
- Support for \mathscr.
- Formal grammar is incomplete
- Add support for ⊈
- support for mathjax 3 HOT 1
- Make comma `,` escapable without making it a text `","` HOT 2
- Please add `∼` (tilde operator) and `≁` (not tilde) HOT 2
- Thousands separator not documented HOT 2
- AsciiMath render intermittently not triggering in dropdown menu on iOS Safari HOT 1
- MathML-Core support shipped by default in chromium 109 HOT 2
- Convert asciimath JavaScript output to PDF
- Fraction bars aren't rendered as text HOT 2
- hyperlinks
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 asciimathml.