0

I have a rather strange question. when i am using \begin{bmatrix} it does not automatically come up with \end{bmatrix} as i have to type this manually. I am completely aware of how to use this command. Its just that it would save some time if \end{bmatrix} generates automatically when i open \begin{bmatrix}. Thanks for any help. I am using overleaf by the way.

\usepackage{amsmath,amssymb,amstext}

\begin{align} A^ = A-BK &= \begin{bmatrix} -a_2 - b_2k_1 &1 - b_2k_2 &-b_2k_3\ - a_1 - b_1k_1 &-b_1k_2 &1 - b_1k_3 \ - a_0 - k_1 &-k_2 &-k_3 \end{bmatrix}\ &= \begin{bmatrix} 0 &0 &1\0 &1 &0\ -1 &-3 &-3 \end{bmatrix} \end{align*}

Zarko
  • 296,517
  • 1
    Welcome to TeX.SE. You always need to write begin and end of any environment, including bmatrix. However, some editors offers functionality to auto complete environments. For example. when you start to write \begin{bmatrix} it immediately add \end{matrix} and space between them, where you fill/write content of your matrix. This functionality has nothing to do with LaTeX. It require, that any environment had to be open (by \bagin{...}) and closed (by \end{...}). – Zarko Nov 22 '20 at 00:34
  • 1
    any command completion is just a question about the editor so you are just asking about overleaf not a "by the way" side comment. According to this answer you can not add to the list of known commands but could put in a feature request https://tex.stackexchange.com/a/479104 – David Carlisle Nov 22 '20 at 00:42
  • hmmm.. I see, thanks everyone – LearningInProgress Nov 23 '20 at 01:39

1 Answers1

2

Command completion is purely a question about the editor not about latex.

As far as I can see Overleaf's editor does not "know" about bmatrix but it will pick up environments used earlier in the document, this screenshot shows a "later" bmatrix being added. As soon as you type \begin the \begin{bmatrix} is offered which you can tab-complete at which point the closing \end{bmatrix} is added.

enter image description here

Note \begin{bmatrix}...env in the menu.

David Carlisle
  • 757,742