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

ampersand in matrix environment #1427

Closed
VhJoren opened this issue May 19, 2020 · 2 comments · Fixed by #1431
Closed

ampersand in matrix environment #1427

VhJoren opened this issue May 19, 2020 · 2 comments · Fixed by #1431
Assignees
Labels
bug Deficiencies in TeXiFy behaviour.
Milestone

Comments

@VhJoren
Copy link
Contributor

VhJoren commented May 19, 2020

Type of JetBrains IDE (IntelliJ, PyCharm, etc.) and version

PyCharm 2020.1

Operating System

Ubuntu 18

TeXiFy IDEA version

0.7-alpha.73

What I did (steps to reproduce)

Use one of the matrix environments of amsmath, e.g.

\begin{equation}
  \begin{bmatrix}
  a & b \\
  c & d
  \end{bmatrix}
\end{equation}

Expected behavior

No inspections triggered for & in any matrix environment (just like in align environment).

Actual behavior

Inspection to replace & by \& triggered.

@VhJoren VhJoren added bug Deficiencies in TeXiFy behaviour. untriaged Issue type still needs to be triaged or verified. labels May 19, 2020
@VhJoren
Copy link
Contributor Author

VhJoren commented May 19, 2020

I just updated from an older version (I think 0.7-alpha.71), and see that the inspection now also gets triggered in align environments. Interestingly, it does not get triggered when typing \\&

@HannahSchellekens HannahSchellekens self-assigned this May 19, 2020
@HannahSchellekens HannahSchellekens removed the untriaged Issue type still needs to be triaged or verified. label May 19, 2020
@HannahSchellekens HannahSchellekens added this to the b0.6.10 milestone May 19, 2020
@HannahSchellekens
Copy link
Member

HannahSchellekens commented May 19, 2020

Ah. bmatrix is simply not recognised. Will add. (only matrix and pmatrix, and smallmatrix)

HannahSchellekens added a commit that referenced this issue May 19, 2020
HannahSchellekens added a commit that referenced this issue May 19, 2020
…1431)

* Added matrix and pmatrix environments to the default environment list.

* Updated EscapeAmpersand inspection tests to test for matrix environments (no trigger).

* Fixed #1427: Expanded the list of invalid ampersand locations.

Also moved magic contents to Magic.

* Removed unnecessary set appending.

* Applied suggestions:
- Support for all [-|b|B|v|V|p|g]matrix[*], [-|b|B|v|V|p]smallmatrix[*] matrices in autocomplete and get ignored in EscapeAmpersand inspection.
- Removed duplicate entries in alignmentEnvironments (magic).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants