[gtksourceview/wip/latex] latex.lang: math environment



commit 42a70e522d7b9d11662fe3cb8bcea75aa8993244
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Nov 28 18:13:31 2013 +0100

    latex.lang: math environment
    
    It doesn't work, the \end command is highlighted by the common-commands
    context, included in the math env context.

 data/language-specs/latex.lang |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/latex.lang b/data/language-specs/latex.lang
index e4845c5..275e09c 100644
--- a/data/language-specs/latex.lang
+++ b/data/language-specs/latex.lang
@@ -374,6 +374,18 @@
       </include>
     </context>
 
+    <context id="math-3" style-ref="math" class="no-spell-check">
+      <start>(\\begin)\{(math)\}</start>
+      <end>(\\end)\{(math)\}</end>
+      <include>
+        <context sub-pattern="1" where="start" style-ref="common-commands"/>
+        <context sub-pattern="2" where="start" style-ref="name"/>
+        <context sub-pattern="1" where="end" style-ref="common-commands"/>
+        <context sub-pattern="2" where="end" style-ref="name"/>
+        <context ref="in-math"/>
+      </include>
+    </context>
+
     <context id="inline-math-1" style-ref="inline-math" class="no-spell-check">
       <start>\$</start>
       <end>\$</end>
@@ -398,6 +410,7 @@
       <include>
         <context ref="math-1"/>
         <context ref="math-2"/>
+        <context ref="math-3"/>
         <context ref="inline-math-1"/>
         <context ref="inline-math-2"/>
       </include>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]