summaryrefslogtreecommitdiffstats
path: root/kate/data/latex.xml
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-02 09:20:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-02 09:20:27 +0000
commitd7b9791584eda0f022813fd2b2df50f59eba29c5 (patch)
tree395d2d48909ce6f9e002106d1638610f7a7c8321 /kate/data/latex.xml
parent84bbc54a086fc6894b247488bf62bdff04dd55fa (diff)
downloadtdelibs-d7b9791584eda0f022813fd2b2df50f59eba29c5.tar.gz
tdelibs-d7b9791584eda0f022813fd2b2df50f59eba29c5.zip
Added remaining missing Kate xml files
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1068844 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/data/latex.xml')
-rw-r--r--kate/data/latex.xml141
1 files changed, 132 insertions, 9 deletions
diff --git a/kate/data/latex.xml b/kate/data/latex.xml
index fbbc9c784..4c944cd50 100644
--- a/kate/data/latex.xml
+++ b/kate/data/latex.xml
@@ -1,27 +1,39 @@
-<?xml version="1.01" encoding="UTF-8"?>
+<?xml version="1.0" 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.33" section="Markup" kateversion="2.3" priority="10" 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="\\(cite|parencite|autocite|Autocite|citetitle)\*(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
+ <RegExpr String="\\(cites|Cites|parencites|Parencites|autocites|Autocites|supercites|footcites|Footcites)(?=[^a-zA-Z])" attribute="Structure" context="FancyLabel"/>
+ <RegExpr String="\\(cite|nocite|Cite|parencite|Parencite|footcite|Footcite|textcite|Textcite|supercite|autocite|Autocite|citeauthor|Citeauthor|citetitle|citeyear|citeurl|nocite|fullcite|footfullcite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
+ <RegExpr String="\\(subref\*?|cref\*?|label|pageref|autoref|ref|vpageref|vref|pagecite)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
<RegExpr String="\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)\*?\s*(?=[\{\[])" attribute="Structure" context="Sectioning"/>
- <RegExpr String="\\(re)?newcommand(?=[^a-zA-Z])" attribute="Keyword" context="NewCommand"/>
+ <RegExpr String="\\(footnote)\*?\s*(?=[\{\[])" attribute="Footnote" context="Footnoting"/>
+ <RegExpr String="\\(renewcommand|providenewcommand|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" />
+ <StringDetect String="\iffalse" attribute="Comment" context="Multiline Comment"/>
+ <StringDetect String="\ensuremath{" attribute="Math" context="MathModeEnsure"/>
<DetectChar char="\" attribute="Keyword" context="ContrSeq"/>
<StringDetect String="$$" attribute="Math" context="MathModeDisplay" beginRegion="mathMode" />
<DetectChar char="$" attribute="Math" context="MathMode" beginRegion="mathMode" />
- <DetectChar char="%" attribute="Comment" context="Comment"/>
<RegExpr String="%\s*BEGIN.*$" attribute="Region Marker" context="#stay" beginRegion="regionMarker" firstNonSpace="true" />
<RegExpr String="%\s*END.*$" attribute="Region Marker" context="#stay" endRegion="regionMarker" firstNonSpace="true" />
+ <DetectChar char="%" attribute="Comment" context="Comment"/>
<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 +71,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>
@@ -90,7 +139,7 @@
<StringDetect String="verb*" attribute="Keyword" context="Verb"/>
<RegExpr String="verb(?=[^a-zA-Z])" attribute="Keyword" context="Verb"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
- <RegExpr String="[a-zA-Z]+(\+?|\*{0,3})" attribute="Keyword" context="#pop"/>
+ <RegExpr String="[a-zA-Z@]+(\+?|\*{0,3})" attribute="Keyword" context="#pop"/>
<RegExpr String="[^a-zA-Z]" attribute="Keyword" context="#pop" />
</context>
<context name="ToEndOfLine" attribute="Normal Text" lineEndContext="#pop">
@@ -127,6 +176,27 @@
<RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop#pop"/>
</context>
+ <!-- labels from biblatex commands -->
+ <context name="FancyLabel" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
+ <RegExpr String="\s*\{\s*" attribute="Normal Text" context="FancyLabelParameter"/>
+ <RegExpr String="\s*\[\s*" attribute="Normal Text" context="LabelOption"/>
+ <RegExpr String="\s*\(\s*" attribute="Normal Text" context="FancyLabelRoundBrackets"/>
+ </context>
+
+ <context name="FancyLabelParameter" attribute="Environment" lineEndContext="#stay">
+ <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+ <RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop"/>
+ </context>
+
+ <context name="FancyLabelRoundBrackets" attribute="Normal Text" lineEndContext="#stay">
+ <StringDetect String="\(" attribute="Math" context="MathMode" beginRegion="mathMode" />
+ <DetectChar char="\" attribute="Keyword" context="ContrSeq"/>
+ <DetectChar char="$" attribute="Math" context="MathMode" beginRegion="mathMode" />
+ <DetectChar char="%" attribute="Comment" context="Comment"/>
+ <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+ <RegExpr String="\s*\)\s*" attribute="Normal Text" context="#pop"/>
+ </context>
+
<!-- start of an environment -->
<context name="FindEnvironment" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char="{" attribute="Normal Text" context="Environment"/>
@@ -137,8 +207,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="(tabularx|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"/>
@@ -217,6 +288,7 @@
<StringDetect String="$$" attribute="Error" context="#stay" />
<DetectChar char="$" attribute="Error" context="#stay" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
+ <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="%\s*BEGIN.*$" attribute="Region Marker" context="#stay" beginRegion="regionMarker" firstNonSpace="true"/>
<RegExpr String="%\s*END.*$" attribute="Region Marker" context="#stay" endRegion="regionMarker" firstNonSpace="true"/>
</context>
@@ -228,6 +300,35 @@
<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"/>
+ <StringDetect String="@{" attribute="Column Separator" context="Column Separator"/>
+ <RegExpr String="\\end(?=\s*\{(tabularx|tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)\*?\})" attribute="Structure" context="TabFindEnd"/>
+ <IncludeRules context="Normal Text" />
+ </context>
+
+ <context name="Column Separator" attribute="Column Separator" lineEndContext="#stay">
+ <DetectChar char="{" attribute="Column Separator" context="Column Separator"/>
+ <DetectChar char="}" attribute="Column Separator" context="#pop"/>
+ <RegExpr String="." attribute="Column Separator" context="#stay"/>
+<!-- the last regexp is very stupid. Suggestions are welcome! Fallthrough did not help-->
+ </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="(tabularx|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" />
@@ -255,6 +356,13 @@
<IncludeRules context="MathModeCommon" />
</context>
+ <!-- math mode: \ensuremath{...} !-->
+ <context name="MathModeEnsure" attribute="Math" lineEndContext="#stay">
+ <DetectChar char="{" attribute="Math" context="MathModeEnsure" />
+ <DetectChar char="}" attribute="Math" context="#pop" />
+ <IncludeRules context="MathModeCommon" />
+ </context>
+
<!-- math mode common -->
<context name="MathModeCommon" attribute="Math" lineEndContext="#stay">
<RegExpr String="\\(begin|end)\s*\{(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign|alignat|xalignat|xxalignat)\*?\}" attribute="Error" context="#stay"/>
@@ -283,6 +391,7 @@
<context name="MathModeTextParameterStart" attribute="Normal Text" lineEndContext="#stay" >
<RegExpr String="\\." attribute="Normal Text" context="#stay"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+ <RegExpr String="\$.*\$" minimal="true" attribute="Math" context="#stay"/>
<DetectChar char="{" attribute="Normal Text" context="MathModeTextParameter"/>
<DetectChar char="}" attribute="Normal Text" context="#pop#pop"/>
<DetectChar char="%" attribute="Comment" context="Comment"/>
@@ -296,10 +405,17 @@
<DetectChar char="%" attribute="Comment" context="Comment"/>
</context>
+ <!-- iffalse aka multiline comment -->
+ <context name="Multiline Comment" attribute="Comment" lineEndContext="#stay">
+ <StringDetect String="\fi" attribute="Comment" context="#pop"/>
+ <StringDetect String="\else" attribute="Comment" context="#pop"/>
+ </context>
+
<!-- comment -->
<context name="Comment" attribute="Comment" lineEndContext="#pop">
<RegExpr String="(FIXME|TODO):?" attribute="Alert" context="#stay"/>
- <DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
+ <StringDetect String="\KileResetHL" attribute="Comment" context="Normal Text"/>
+ <StringDetect String="\KateResetHL" attribute="Comment" context="Normal Text"/>
</context>
</contexts>
@@ -315,11 +431,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>