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

tab and break in all matrices #58

Closed
julianmueller opened this issue Jul 5, 2022 · 6 comments
Closed

tab and break in all matrices #58

julianmueller opened this issue Jul 5, 2022 · 6 comments

Comments

@julianmueller
Copy link

julianmueller commented Jul 5, 2022

Hi,
I like the feature, where you can use TAB and ENTER in the \begin{pmatrix}\end{pmatrix}environment to insert & and \\. But unfortunately, i also use other types of matrices like the following, which this feature does not work for:

  • \begin{matrix} ... \end{matrix}
  • \begin{bmatrix} ... \end{bmatrix}
  • \begin{Bmatrix} ... \end{Bmatrix}
  • \begin{vmatrix} ... \end{vmatrix}
  • \begin{Vmatrix} ... \end{Vmatrix}
  • \begin{smallmatrix} ... \end{smallmatrix}
  • \begin{align} ... \end{align}
  • \begin{alignat}{col+1/2} ... \end{alignat}
  • \array{...}
  • \begin{array}{l | c c r} ... \end{array}

I did not test all of them, and Im not certain if thats all of Mathjax Matrix-alikes, that are supported by Obsidian.

Is it possible to adept the plugin for TAB and ENTER auto-completition in these environments?
Thanks

@joeyuping
Copy link
Owner

Thank you so much for this suggestion!!

I have included the tab and enter function for some of the matrixes as suggested:
\begin{matrix} ... \end{matrix}
\begin{bmatrix} ... \end{bmatrix}
\begin{Bmatrix} ... \end{Bmatrix}
\begin{vmatrix} ... \end{vmatrix}
\begin{Vmatrix} ... \end{Vmatrix}
\begin{smallmatrix} ... \end{smallmatrix}

Please update to v2.3.4 and see if its ok.
Also, a quick way to write all these matrixes is to add statements like the following into the custom shorthand :
Bm:\begin{Bmatrix}#cursor\end{Bmatrix};
vm:\begin{vmatrix}#cursor\end{vmatrix};
...

this way, by typing "Bm" and space bar, the matrix begin and end text will be pasted and cursor will be placed in between.
the tab and enter function should work within the matrix environment.

Thanks again!

@julianmueller
Copy link
Author

Thank you very much! Great idea. So far I used the matrix shorthand CTRL+SHIFT+M for a matrix and then added p/b/v in begin/end to fit it to my needs.
But unfortunately, related to #57 cursor does not work for me.

@julianmueller
Copy link
Author

sorry to say... but the TAB and ENTER in not working for me, for the listed matrix types... :(

@joeyuping joeyuping reopened this Aug 4, 2022
@joeyuping
Copy link
Owner

@julianmueller Hi!

I have just updated another v2.3.7, could you kindly update and see if the issue may have been resolved?

@julianmueller
Copy link
Author

Thank you very much! Issue is fixed, everything is working as expected. Also this resolves issue #57, #cursor and #tab are working correctly.

@julianmueller
Copy link
Author

I just learned about rcases which is like cases but with the brakets on the right. You might want to add this as well :) (or make an option where one can specify all the environments where they want the TAB and ENTER option working.

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

No branches or pull requests

2 participants