Comments (8)
Just so I can replicate it properly, what is the symbol you're putting before the text(-)? It's not showing properly.
That said, the issue here is that the AMTgetTeXsymbol function assumes that every symbol should get backslashed unless it has the val property set. It looks like some of the brackets need that property set. I've never run into this because I usually have matched brackets, which get transformed into \left[ \right]. Whatever symbol you're using on the left must not be something the parser recognizes as a left bracket.
from asciimathml.
Here is more info on that first character: latex demo and more info or if the last link doesn't work here is the info on that site about that character:
Character ⟨
Character name MATHEMATICAL LEFT ANGLE BRACKET
Hex code point 27E8
Decimal code point 10216
Hex UTF-8 bytes E2 9F A8
Octal UTF-8 bytes 342 237 250
UTF-8 bytes as Latin-1 characters bytes â <9F> ¨
According to the name it seems like some kind of bracket
from asciimathml.
Ahh, yeah, AsciiMath doesn't understand Unicode characters for the most part.
AMTparseAMtoTeX("(:3,5]") would return "{\left\langle{3},{5}\right]}", which is probably the output you were wanting.
Even so, unmatched brackets should still be handled better. I'll try to get that fixed.
from asciimathml.
Yep, that is the correct output. Thanks a lot!! Hope you have the time to work on this +1
from asciimathml.
I also found this one
AMTparseAMtoTeX('[2,8rangle')
--> "{\left[{2,8}\rightrangle}"
Which is incorrect, and should be
"{\left[{2,8}\right\rangle}"
from asciimathml.
Yup, somewhat related issue. In that case, since the tex wasn't the symbol.input, then when the symbols get initialized the info needed for the AMTgetTeXbracket function gets lost.
It looks like I need to revamp that function to use the symbol.val attribute instead, make sure it gets copied over on the symbol initialization, and add the symbol.val attribute to the plain brackets as noted earlier. I'll see if I can get that to work.
On Thursday, July 9, 2015 1:28 AM, Lucas Calje <[email protected]> wrote:
I also found this oneAMTparseAMtoTeX('[2,8rangle')
--> "{\left[{2,8}\rightrangle}"
Which is incorrect, and should be"{\left[{2,8}\right\rangle}"
—
Reply to this email directly or view it on GitHub.
from asciimathml.
Also related
'langletext(-)2 , 4 ]' --> {\leftlangle\text{-}{2},{4}\right]}
Any plans yet to fix this ? If not, and it is not too much work / complicated you can give me some hints were to like so I can fix this!
from asciimathml.
Sorry it took me so long to get this fixed; I had it basically done several months ago but forgot to get it finalized and pushed out.
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.