Closed jlelong closed 2 years ago
I think it is this line
Change it to:
"begin": "(?:\\s*)((\\\\)begin)(\\{)((?:array|equation|(?:IEEE)?eqnarray|multline|align|aligned|alignat|flalign|flaligned|flalignat|split|gather|gathered|[\+]*cases|(?:display)?math|[a-zA-Z\+]*matrix|(?:(?:arg)?(?:mini|maxi)))(?:\\*|!)?)(\\})(\\s*\\n)?",
may work.
for example, \begin{nothistypematrix} \end{nothistypematrix}
will be highlighted
There are two issues here
*
for environments+matrix
environment is recognized as a tabular environment, ie &
is highlighted as a column separator.I think it is this line
https://github.com/James-Yu/LaTeX-Workshop/blob/ef04d42bb2e13b1381961163672ef8b734703fab/syntax/LaTeX.tmLanguage.json#L816
I changed that line and all syntax highlighting disappeared
2. You expect that the `+matrix` environment is recognized as a tabular environment, ie `&` is highlighted as a column separator.
all +matrixes and +cases should be the same as the envs without +
Thanks! @jielong when will the users get this update?
The fix will be available in the next release of LaTeX-Workshop.
Originally posted by @Firestar-Reimu in James-Yu/LaTeX-Workshop#3485
This is another issue besides #2851, relating to
tabularray
packageYou can see that, after adding the
+
the highlight is wrong:I used to think all
\begin
and\end
pairs will be highlighted?