GithubHelp home page GithubHelp logo

Incorrect transform of ] about asciimathml HOT 8 CLOSED

scaljeri avatar scaljeri commented on May 3, 2024
Incorrect transform of ]

from asciimathml.

Comments (8)

drlippman avatar drlippman commented on May 3, 2024

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.

scaljeri avatar scaljeri commented on May 3, 2024

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.

drlippman avatar drlippman commented on May 3, 2024

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.

scaljeri avatar scaljeri commented on May 3, 2024

Yep, that is the correct output. Thanks a lot!! Hope you have the time to work on this +1

from asciimathml.

scaljeri avatar scaljeri commented on May 3, 2024

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.

drlippman avatar drlippman commented on May 3, 2024

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.

scaljeri avatar scaljeri commented on May 3, 2024

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.

drlippman avatar drlippman commented on May 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.