asciimath / asciimathml

A new home for asciimathml
http://asciimath.org/
MIT License
958 stars 184 forks source link

Row vectors in numerators don't display as vectors #113

Closed jolyonb closed 4 years ago

jolyonb commented 4 years ago

The vector [[1, 2, 3]] renders as a row vector, complete with square brackets. If you divide by anything though, those square brackets vanish: [[1, 2, 3]]/2. I'm not sure this is the intended behavior!

drlippman commented 4 years ago

This is not unexpected behavior, but certainly not desirable. Normally Asciimath removes brackets around numerators and denominators, so that something like (x+4)/4 will display without parens in the numerator. But that unwrapping is probably not desirable for matrices/vectors.

I'll make a fix so it skips the bracket removal for matrices.

In the meantime, you can fix the display by adding an additional bracket around your numerator, like ([[1,2,3]])/2