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 144 145 146 147 148 149 150 151 152
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<language
name="ConTeXt"
version="10"
section="Markup"
kateversion="5.0"
priority="8"
extensions="*.ctx;*.mkiv;*.mkvi;*.mkxl;*.mklx"
mimetype="text/x-tex"
casesensitive="1"
author="Philipp A. (flying-sheep@web.de)"
license="GPL"
>
<highlighting>
<list name="titles">
<item>\part</item>
<item>\chapter</item>
<item>\section</item>
<item>\subsection</item>
<item>\subsubsection</item>
<item>\title</item>
<item>\subject</item>
<item>\subsubject</item>
<item>\subsubsubject</item>
</list>
<contexts>
<!-- Normal text -->
<context name="Normal Text" attribute="Normal Text" lineEndContext="#stay">
<Detect2Chars char="$" char1="$" attribute="Block" context="MathModeDisplay"/>
<DetectChar char="$" attribute="Block" context="MathMode"/>
<StringDetect String="\mathematics" attribute="Block" context="MathModeMacroFind"/>
<StringDetect String="\math" attribute="Block" context="MathModeMacroFind"/>
<Detect2Chars char="\" char1="m" attribute="Block" context="MathModeMacroFind"/>
<StringDetect String="\startformula" attribute="Block" context="MathModeFormula"/>
<StringDetect String="\starttyping" attribute="Block" context="Verbatim"/>
<keyword String="titles" attribute="Section" context="#stay"/>
<IncludeRules context="Common"/>
</context>
<!-- Macro -->
<context name="Macro" attribute="Macro" lineEndContext="#stay">
<RegExpr String="[a-zA-Z_]+[a-zA-Z@_]*|[^a-zA-Z_]" attribute="Macro" context="#pop"/>
</context>
<!-- Comment -->
<context name="Comment" attribute="Comment" lineEndContext="#pop">
<IncludeRules context="##Comments"/>
</context>
<!-- Math Modes -->
<context name="MathMode" attribute="Math" lineEndContext="#pop">
<DetectChar char="$" attribute="Block" context="#pop"/>
<StringDetect String="\stopformula" attribute="Error" context="#stay"/>
<IncludeRules context="MathModeCommon"/>
</context>
<context name="MathModeMacroFind" attribute="Math" lineEndContext="#stay">
<DetectChar char="{" attribute="Brace" context="#pop!MathModeMacro"/>
</context>
<context name="MathModeMacro" attribute="Math" lineEndContext="#stay">
<DetectChar char="{" attribute="Brace" context="MathModeMacro"/>
<DetectChar char="}" attribute="Brace" context="#pop"/>
<DetectChar char="$" attribute="Error" context="#stay"/>
<StringDetect String="\stopformula" attribute="Error" context="#stay"/>
<IncludeRules context="MathModeCommon"/>
</context>
<context name="MathModeDisplay" attribute="Math" lineEndContext="#stay">
<Detect2Chars char="$" char1="$" attribute="Block" context="#pop"/>
<DetectChar char="$" attribute="Error" context="#stay"/>
<StringDetect String="\stopformula" attribute="Error" context="#stay"/>
<IncludeRules context="MathModeCommon"/>
</context>
<context name="MathModeFormula" attribute="Math" lineEndContext="#stay">
<DetectChar char="$" attribute="Error" context="#stay"/>
<StringDetect String="\stopformula" attribute="Block" context="#pop"/>
<IncludeRules context="MathModeCommon"/>
</context>
<context name="MathModeCommon" attribute="Error" lineEndContext="#stay">
<AnyChar String="^_" attribute="Brace" context="#stay"/>
<StringDetect String="\startformula" attribute="Error" context="#stay"/>
<StringDetect String="\text" attribute="Block" context="MathModeTextFind"/>
<IncludeRules context="Common"/>
</context>
<!--Math text-->
<context name="MathModeTextFind" attribute="Normal Text" lineEndContext="#stay" >
<DetectChar char="{" attribute="Brace" context="#pop!MathModeText"/>
</context>
<context name="MathModeText" attribute="Normal Text" lineEndContext="#stay" >
<DetectChar char="{" attribute="Brace" context="MathModeText"/>
<DetectChar char="}" attribute="Brace" context="#pop"/>
<IncludeRules context="Normal Text"/>
</context>
<!--Verbatim TODO: \startC support-->
<context name="Verbatim" attribute="Verbatim" lineEndContext="#stay">
<StringDetect String="\starttyping" attribute="Block" context="Verbatim"/>
<StringDetect String="\stoptyping" attribute="Block" context="#pop"/>
</context>
<!--Common-->
<context name="Common" attribute="Error" lineEndContext="#stay">
<DetectChar char="%" attribute="Comment" context="Comment"/>
<RegExpr String="\\start(?:[a-zA-Z_]+)" attribute="Block" context="#stay" beginRegion="block"/>
<RegExpr String="\\stop(?:[a-zA-Z_]+)" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\bTABLEhead" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTABLEnext" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTABLEbody" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTABLEfoot" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTABLE" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTR" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\bTD" attribute="Block" context="#stay" beginRegion="block"/>
<StringDetect String="\eTABLEhead" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTABLEnext" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTABLEbody" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTABLEfoot" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTABLE" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTR" attribute="Block" context="#stay" endRegion="block"/>
<StringDetect String="\eTD" attribute="Block" context="#stay" endRegion="block"/>
<DetectChar char="\" attribute="Macro" context="Macro"/>
<DetectChar char="{" attribute="Brace" context="#stay" beginRegion="block"/>
<DetectChar char="}" attribute="Brace" context="#stay" endRegion="block"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" /><!--(Hi, I’m text)-->
<itemData name="Comment" defStyleNum="dsComment" /><!--(%Comment)-->
<itemData name="Section" defStyleNum="dsKeyword" /><!--\section{(Fancy!)}-->
<itemData name="Brace" defStyleNum="dsChar" spellChecking="false"/><!--({})-->
<itemData name="Math" defStyleNum="dsOthers" spellChecking="false"/><!--($5$)-->
<itemData name="Macro" defStyleNum="dsFunction" spellChecking="false"/><!--(\foo)-->
<itemData name="Block" defStyleNum="dsRegionMarker" spellChecking="false"/><!--\start(bar), \stop(bar)-->
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/><!--$($$)-->
<itemData name="Verbatim" defStyleNum="dsString" spellChecking="false"/><!--\starttyping(eggs)\stoptyping, \definetyping[C] \startC(umm…)\stopC-->
</itemDatas>
</highlighting>
<general>
<keywords weakDeliminator="\" wordWrapDeliminator=",{}[]"/>
<comments>
<comment name="singleLine" start="%" />
</comments>
</general>
<spellchecking>
<encodings>
<encoding string="''" ignored="true" />
</encodings>
</spellchecking>
</language>
<!-- kate: space-indent off; indent-width 4; -->
|