summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdelibs/kdelibs-3.5.10-latex-syntax-kile-2.0.3.patch
blob: 450dd1fe8696d9c4f12512d7b79bc078d6975ce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
diff -ur kdelibs-3.5.10/kate/data/latex.xml kdelibs-3.5.10-latex-syntax-kile-2.0.3/kate/data/latex.xml
--- kdelibs-3.5.10/kate/data/latex.xml	2007-05-14 09:52:27.000000000 +0200
+++ kdelibs-3.5.10-latex-syntax-kile-2.0.3/kate/data/latex.xml	2008-12-05 14:08:28.000000000 +0100
@@ -1,16 +1,18 @@
 <?xml version="1.01" encoding="UTF-8"?>
 <!DOCTYPE language SYSTEM "language.dtd">
-<language name="LaTeX" version="1.25" section="Markup" kateversion="2.3" extensions="*.tex; *.ltx; *.dtx; *.sty; *.cls;" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)" license="LGPL" >
+<language name="LaTeX" version="1.29" section="Markup" kateversion="2.3" extensions="*.tex; *.ltx; *.dtx; *.sty; *.cls;" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Holger Danielsson (holger.danielsson@versanet.de)+Michel Ludwig (michel.ludwig@kdemail.net)+Thomas Braun (braun@physik.fu-berlin.de)" license="LGPL" >
   <highlighting>
     <contexts>
       <!-- Normal text -->
       <context name="Normal Text" attribute="Normal Text" lineEndContext="#stay">
         <RegExpr String="\\begin(?=[^a-zA-Z])" attribute="Structure" context="FindEnvironment" beginRegion="block" />
         <RegExpr String="\\end(?=[^a-zA-Z])" attribute="Structure" context="FindEnvironment" endRegion="block" />
-        <RegExpr String="\\(label|pageref|ref|vpageref|vref|cite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
+        <RegExpr String="\\(label|pageref|autoref|ref|vpageref|vref|cite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
         <RegExpr String="\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)\*?\s*(?=[\{\[])" attribute="Structure" context="Sectioning"/>
+        <RegExpr String="\\(footnote)\*?\s*(?=[\{\[])" attribute="Footnote" context="Footnoting"/>
         <RegExpr String="\\(re)?newcommand(?=[^a-zA-Z])" attribute="Keyword" context="NewCommand"/>
         <RegExpr String="\\(e|g|x)?def(?=[^a-zA-Z])" attribute="Keyword" context="DefCommand"/>
+	<RegExpr String="&lt;&lt;.*&gt;&gt;=" attribute="Normal Text" context="NoWeb" />
         <StringDetect String="\(" attribute="Math" context="MathMode" beginRegion="mathMode" />
         <StringDetect String="\[" attribute="Math" context="MathModeEquation" beginRegion="mathMode" />
         <DetectChar char="\" attribute="Keyword" context="ContrSeq"/>
@@ -22,6 +24,11 @@
         <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
       </context>
 
+	<!-- NoWeb -->
+      <context name="NoWeb" attribute="Normal Text" lineEndContext="#stay" >
+	<RegExpr String="^\s*@\s*" attribute="Normal Text" context="#pop" />
+      </context>
+
       <!-- LaTeX sectioning commands -->
       <context name="Sectioning" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
         <RegExpr String="\[[^\]]*\]" attribute="Normal Text" context="#stay"/>
@@ -59,9 +66,46 @@
         <RegExpr String="[^a-zA-Z]" attribute="Structure Keyword Mathmode" context="#pop" /> 
       </context>
 
+      <!-- LaTeX Footnote commands -->
+      <context name="Footnoting" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+        <RegExpr String="\[[^\]]*\]" attribute="Normal Text" context="#stay"/>
+        <DetectChar char=" " attribute="Normal Text" context="#stay"/>
+        <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>
+        <DetectChar char="}" attribute="Normal Text" context="#pop"/>
+        <DetectChar char="%" attribute="Comment" context="Comment"/>
+      </context>
+      <context name="FootnotingInside" attribute="Footnote Text" lineEndContext="#stay">
+        <DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>
+        <DetectChar char="}" attribute="Normal Text" context="#pop"/>
+        <StringDetect String="\(" attribute="Footnote Math" context="FootnotingMathMode" beginRegion="mathMode" />
+        <DetectChar char="\" attribute="Footnote Keyword" context="FootnotingContrSeq"/>
+        <DetectChar char="$" attribute="Footnote Math" context="FootnotingMathMode" beginRegion="mathMode" />
+        <DetectChar char="%" attribute="Comment" context="Comment"/>
+        <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+      </context>
+      <context name="FootnotingContrSeq" attribute="Keyword" lineEndContext="#pop">
+         <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+        <RegExpr String="[a-zA-Z]+(\+?|\*{0,3})" attribute="Footnote Keyword" context="#pop"/>
+        <RegExpr String="[^a-zA-Z]" attribute="Footnote Keyword" context="#pop" />
+      </context>
+      <context name="FootnotingMathMode" attribute="Footnote Math" lineEndContext="#stay">
+        <StringDetect String="$$" attribute="Error" context="#stay" />
+        <DetectChar char="$" attribute="Footnote Math" context="#pop" endRegion="mathMode" />
+        <Detect2Chars char="\" char1=")" attribute="Footnote Math" context="#pop" endRegion="mathMode" />
+        <Detect2Chars char="\" char1="]" attribute="Error" context="#stay" />
+        <DetectChar char="\" attribute="Footnote Keyword Mathmode" context="FootnotingMathContrSeq"/>
+        <DetectChar char="%" attribute="Comment" context="Comment"/>
+        <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+      </context>
+      <context name="FootnotingMathContrSeq" attribute="Footnote Keyword Mathmode" lineEndContext="#pop">
+        <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+        <RegExpr String="[a-zA-Z]+\*?" attribute="Footnote Keyword Mathmode" context="#pop"/>
+        <RegExpr String="[^a-zA-Z]" attribute="Footnote Keyword Mathmode" context="#pop" /> 
+      </context>
+
       <!-- LaTeX commands \newcommand and \renewcommand -->
       <context name="NewCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
-        <RegExpr String="\s*\{\s*\\[a-zA-Z]+\s*\}(\[\d\](\[[^\]]+\])?)?\{" attribute="Normal Text" context="CommandParameterStart"/>
+        <RegExpr String="\s*\{\s*\\[a-zA-Z]+\s*\}(\[\d\](\[[^\]]*\])?)?\{" attribute="Normal Text" context="CommandParameterStart"/>
         <DetectChar char="}" attribute="Error" context="#pop"/>
       </context>
 
@@ -137,8 +181,9 @@
       <context name="Environment" attribute="Environment" lineEndContext="#stay">
         <RegExpr String="(lstlisting|(B|L)?Verbatim)" attribute="Environment" context="VerbatimEnvParam"/>
         <RegExpr String="(verbatim|boxedverbatim)" attribute="Environment" context="VerbatimEnv"/>
-        <RegExpr String="(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign)" attribute="Environment" context="MathEnv"/>
         <RegExpr String="(alignat|xalignat|xxalignat)" attribute="Environment" context="MathEnvParam"/>
+        <RegExpr String="(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign)" attribute="Environment" context="MathEnv"/>
+        <RegExpr String="(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)" attribute="Environment" context="TabEnv"/>
         <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
         <RegExpr String="[a-zA-Z]" attribute="Environment" context="LatexEnv"/>
         <RegExpr String="\s+" attribute="Error" context="#pop"/>
@@ -228,6 +273,28 @@
         <DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop#pop#pop"  endRegion="block"/>
       </context>
 
+          <!-- environment type 9: tabular -->
+      <context name="TabEnv" attribute="Environment" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop#pop">
+        <DetectChar char="}" attribute="Normal Text" context="Tab"/>
+        <RegExpr String="[a-zA-Z]" attribute="Environment" lookAhead="true" context="#pop"/>
+        <IncludeRules context="EnvCommon" />
+       </context>
+
+      <!-- parse tabular text -->
+      <context name="Tab" attribute="Tab" lineEndContext="#stay">
+	<DetectChar char="&amp;" attribute="Ampersand" context="#stay"/>
+	<RegExpr String="@\{.*\}" minimal="true" attribute="Column Separator" context="#stay"/>
+        <RegExpr String="\\end(?=\s*\{(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)\*?\})" attribute="Structure"  context="TabFindEnd"/>
+	<IncludeRules context="Normal Text" />
+      </context>
+
+      <!-- end of tabular environment -->
+      <context name="TabFindEnd" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
+        <RegExpr String="\s*\{" attribute="Normal Text" context="#stay"/>
+        <RegExpr String="(tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)\*?" attribute="Environment" context="#stay"/>
+        <DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop#pop#pop" endRegion="block"/>
+      </context>
+
       <!-- math mode: starting with $ or \( -->
       <context name="MathMode" attribute="Math" lineEndContext="#stay">
         <StringDetect String="$$" attribute="Error" context="#stay" />
@@ -315,11 +382,18 @@
       <itemData name="Verbatim" defStyleNum="dsNormal" color="#a08000" selColor="#80D0FF" bold="0" italic="0"/>
       <itemData name="Region Marker" defStyleNum="dsRegionMarker" />
       <itemData name="Bullet" defStyleNum="dsNormal" color="#FF00C4" bold="1" underline="1"/>
+      <itemData name="Ampersand" defStyleNum="dsNormal" color="#002793" bold="1" />
+      <itemData name="Column Separator" defStyleNum="dsNormal" color="#002793" />
       <itemData name="Alert" defStyleNum="dsAlert" />
       <itemData name="Structure Text" defStyleNum="dsNormal" color="#000000" selColor="#FFFFFF" bold="1" italic="0"/>
       <itemData name="Structure Keyword" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="1" italic="0"/>
       <itemData name="Structure Math" defStyleNum="dsNormal" color="#00A000" selColor="#FF40FF"  bold="1" italic="0"/>
       <itemData name="Structure Keyword Mathmode" defStyleNum="dsNormal" color="#606000" selColor="#FFD0FF" bold="1" italic="0"/>
+      <itemData name="Footnote" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="0" italic="0"/>
+      <itemData name="Footnote Text" defStyleNum="dsNormal" color="#000000" selColor="#FFFFFF" bold="0" italic="0"/>
+      <itemData name="Footnote Keyword" defStyleNum="dsNormal" color="#800000" selColor="#60FFFF" bold="0" italic="0"/>
+      <itemData name="Footnote Math" defStyleNum="dsNormal" color="#00A000" selColor="#FF40FF"  bold="0" italic="0"/>
+      <itemData name="Footnote Keyword Mathmode" defStyleNum="dsNormal" color="#606000" selColor="#FFD0FF" bold="0" italic="0"/>
      </itemDatas>
   </highlighting>