Bug 267217 - latex syntax highlighting does not detect \end{pmatrix}
Summary: latex syntax highlighting does not detect \end{pmatrix}
Status: RESOLVED FIXED
Alias: None
Product: kile
Classification: Applications
Component: editor (show other bugs)
Version: 2.1b5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Michel Ludwig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 01:50 UTC by g.schlisio
Modified: 2011-09-06 19:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description g.schlisio 2011-02-27 01:50:53 UTC
Version:           2.1b5 (using KDE 4.6.0) 
OS:                Linux

using a latex-syntax like this
<code>
\begin{align}
a = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}
\end{align}
<\code>
kiles standart latex syntax highlighting does not detect the \end{pmatrix}-tag for syntax-highlighting, even thought the tex-file compiles fine.
not detecting this tag leads to misbehaviour in fold option, which is started by the \begin-tag but not endet by the \end-tag. this also appears, if \begin and \end are on different lines and in the  equation-environment. however, the \[ \]-tags work as expected.

Reproducible: Always

Steps to Reproduce:
write sample code, try to fold and unfold it

Actual Results:  
folding the \begin{pmatrix}-tag folds the entire following document instead just the pmatrix-environment

Expected Results:  
fold just the pmatrix-environment
Comment 1 Michel Ludwig 2011-04-25 13:08:35 UTC
Git commit b1936990a96d8f48072e19bc6000c17c5cf77e87 by Michel Ludwig.
Committed on 25/04/2011 at 13:15.
Pushed by mludwig into branch 'master'.

Add support for IEEEeqnarrary(box) and other amsmath matrix environments.

BUG: 267217

M  +4    -4    part/syntax/data/latex.xml     

http://commits.kde.org/kate/b1936990a96d8f48072e19bc6000c17c5cf77e87
Comment 2 Dominik Haumann 2011-09-06 07:55:57 UTC
Now, constructs like \begin{bmatrix} ... \end{bmatrix} are highlighted as error in math mode. This is totally wrong?!

The change in <!-- mode common --> is wrong.
As far as I know, you even *need* to be in math mode in order to use bmatrix and friends.

Can you revert this commit, or at least part of it?
Comment 3 Michel Ludwig 2011-09-06 08:07:48 UTC
Oh dear, I guess one can see that I hardly ever write matrices in LaTeX... ;)

The bit regarding the "error" context is of course wrong. I'll remove it as soon as possible, i.e. tonight probably.
Comment 4 Michel Ludwig 2011-09-06 19:41:33 UTC
Git commit 274b94c49d362ea3277116c98a9c96e240c3cc11 by Michel Ludwig.
Committed on 06/09/2011 at 21:37.
Pushed by mludwig into branch 'master'.

Don't mark IEEEeqnarraybox, smallmatrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix environments as
errors when they are used in math mode.

CCBUG: 267217

M  +2    -2    part/syntax/data/latex.xml

http://commits.kde.org/kate/274b94c49d362ea3277116c98a9c96e240c3cc11
Comment 5 Michel Ludwig 2011-09-06 19:42:08 UTC
Git commit 493bf2d84548c2feedc597ee4b9ef1caed74e67d by Michel Ludwig.
Committed on 06/09/2011 at 21:37.
Pushed by mludwig into branch 'KDE/4.7'.

Don't mark IEEEeqnarraybox, smallmatrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix environments as
errors when they are used in math mode.

CCBUG: 267217

M  +2    -2    part/syntax/data/latex.xml

http://commits.kde.org/kate/493bf2d84548c2feedc597ee4b9ef1caed74e67d