Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One dimensional vectors cause confusion #350

Open
Khazuar opened this issue Jan 15, 2020 · 6 comments
Open

One dimensional vectors cause confusion #350

Khazuar opened this issue Jan 15, 2020 · 6 comments
Assignees
Labels
Sponsored Requested by a sponsor

Comments

@Khazuar
Copy link
Contributor

Khazuar commented Jan 15, 2020

Describe the bug
Pressing ENTER within parentheses converts them into a vector. Removing the newline again doesn't convert it back, so you're stuck with a one-dimensional vector.

To Reproduce
[Steps to reproduce the behavior, for example:]

  1. mathlive.io and open the code section
  2. Insert (, a
  3. Hit ENTER
  4. Notice how your latex content in the code section shows \begin{pmatrix}a \\ \end{pmatrix} now.
  5. Hit BACKSPACE
  6. Notice your latext content now is \begin{pmatrix}a\end{pmatrix}

Expected behavior
I am not quite sure. I'd be great if a one-dimensional vector would be converted back to simple parentheses around the single entry. I am worried though I am asking to introduce lots of complications there.
In older versions of mathlive there were no vectors, so I did not encounter the problem previously. I see us using the vectors at some point, too, though, so I'm happy to have that feature. It's just very undiscoverable for users when their parentheses have become matrix-markup and we cannot expect them to inspect the raw latex markup. The main problem there might be that these 1x1-matrices are not visually distinctive from simple parentheses.

@arnog arnog self-assigned this Jan 15, 2020
@arnog arnog added the Sponsored Requested by a sponsor label Jan 15, 2020
@arnog
Copy link
Owner

arnog commented Jan 15, 2020

I think it's reasonable that in this case once the "row" has been deleted, you get back "(a)" (i.e. no longer a vector).

@saivan
Copy link

saivan commented Mar 7, 2020

I think this is the same problem I had with #225. I think the auto vector behaviour is a bit of a problem here. Is there some way to turn it off?

@stefnotch
Copy link
Contributor

Similar editors avoid this in the first place by using [ ] for vectors and matrices instead of ( ). It's less ambiguous that way.

@arnog arnog assigned stefnotch and unassigned arnog Sep 27, 2020
@yorologo
Copy link

yorologo commented Sep 30, 2020

I have another problem with the vectors.
For expression in latex \begin{pmatrix}a & b & c\end{pmatrix} the ASCIIMath output is empty.
This problem is the same for vectors of all types and sizes.

@arnog
Copy link
Owner

arnog commented Sep 30, 2020

@yorologo good catch! That sounds like a different issue, though. Do you want me to open a new issue or would you rather do it?

@arnog
Copy link
Owner

arnog commented Nov 10, 2020

Issue #654 tracks the ASCIIMath problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsored Requested by a sponsor
Projects
None yet
Development

No branches or pull requests

5 participants