Bug 323048

Summary: [patch] Syntax highlighting incorrect in LaTeX
Product: [Applications] kate Reporter: Michael <mdunphy>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: jonan88, mdunphy
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/kile/+bug/1206957
Latest Commit: Version Fixed In: 4.11.1
Attachments: A patch to fix the broken syntax highlighting

Description Michael 2013-07-31 15:52:17 UTC
The following code, when pasted into the Kile editor (via Katepart), highlights the second "cases" wrong:

\begin{align}
 U_{bg}(z) = \begin{cases}
              U_{max} e^{-(b(z-z_0))^4} &\mbox {if } z \leq z_0,\\
              U_{max} &\mbox {if } z > z_0,\\
             \end{cases}
\end{align}

Reproducible: Always

Steps to Reproduce:
1. Paste above code into Kate, 
2. select Tools->Highlighting->Markup->Latex
3.
Actual Results:  
The second "cases" is green

Expected Results:  
The second "cases" should be blue
Comment 1 Michael 2013-07-31 15:53:32 UTC
Created attachment 81484 [details]
A patch to fix the broken syntax highlighting
Comment 2 Dominik Haumann 2013-08-01 08:18:05 UTC
Git commit 4afa72930126f7241aa7eb54307f80db1509d4e7 by Dominik Haumann.
Committed on 01/08/2013 at 08:17.
Pushed by dhaumann into branch 'master'.

fix cases environment highlighting

Thanks to Michael for the patch!
FIXED-IN: 4.11.1

M  +10   -1    examples/syntax/highlight.tex
M  +3    -3    part/syntax/data/latex.xml

http://commits.kde.org/kate/4afa72930126f7241aa7eb54307f80db1509d4e7
Comment 3 Dominik Haumann 2013-08-01 08:18:40 UTC
Git commit 76ef0c074b7dd85dfe5e7bb45e9f0ba3cf999efc by Dominik Haumann.
Committed on 01/08/2013 at 08:17.
Pushed by dhaumann into branch 'KDE/4.11'.

fix cases environment highlighting

Thanks to Michael for the patch!
FIXED-IN: 4.11.1

M  +10   -1    examples/syntax/highlight.tex
M  +3    -3    part/syntax/data/latex.xml

http://commits.kde.org/kate/76ef0c074b7dd85dfe5e7bb45e9f0ba3cf999efc