| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language |
| 4 |
name="ConTeXt" |
| 5 |
version="10" |
| 6 |
section="Markup" |
| 7 |
kateversion="5.0" |
| 8 |
priority="8" |
| 9 |
extensions="*.ctx;*.mkiv;*.mkvi;*.mkxl;*.mklx" |
| 10 |
mimetype="text/x-tex" |
| 11 |
casesensitive="1" |
| 12 |
author="Philipp A. ([email protected])" |
| 13 |
license="GPL" |
| 14 |
> |
| 15 |
<highlighting> |
| 16 |
<list name="titles"> |
| 17 |
<item>\part</item> |
| 18 |
<item>\chapter</item> |
| 19 |
<item>\section</item> |
| 20 |
<item>\subsection</item> |
| 21 |
<item>\subsubsection</item> |
| 22 |
<item>\title</item> |
| 23 |
<item>\subject</item> |
| 24 |
<item>\subsubject</item> |
| 25 |
<item>\subsubsubject</item> |
| 26 |
</list> |
| 27 |
<contexts> |
| 28 |
<!-- Normal text --> |
| 29 |
<context name="Normal Text" attribute="Normal Text" lineEndContext="#stay"> |
| 30 |
<Detect2Chars char="$" char1="$" attribute="Block" context="MathModeDisplay"/> |
| 31 |
<DetectChar char="$" attribute="Block" context="MathMode"/> |
| 32 |
<StringDetect String="\mathematics" attribute="Block" context="MathModeMacroFind"/> |
| 33 |
<StringDetect String="\math" attribute="Block" context="MathModeMacroFind"/> |
| 34 |
<Detect2Chars char="\" char1="m" attribute="Block" context="MathModeMacroFind"/> |
| 35 |
<StringDetect String="\startformula" attribute="Block" context="MathModeFormula"/> |
| 36 |
<StringDetect String="\starttyping" attribute="Block" context="Verbatim"/> |
| 37 |
<keyword String="titles" attribute="Section" context="#stay"/> |
| 38 |
<IncludeRules context="Common"/> |
| 39 |
</context> |
| 40 |
|
| 41 |
<!-- Macro --> |
| 42 |
<context name="Macro" attribute="Macro" lineEndContext="#stay"> |
| 43 |
<RegExpr String="[a-zA-Z_]+[a-zA-Z@_]*|[^a-zA-Z_]" attribute="Macro" context="#pop"/> |
| 44 |
</context> |
| 45 |
|
| 46 |
<!-- Comment --> |
| 47 |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> |
| 48 |
<IncludeRules context="##Comments"/> |
| 49 |
</context> |
| 50 |
|
| 51 |
<!-- Math Modes --> |
| 52 |
<context name="MathMode" attribute="Math" lineEndContext="#pop"> |
| 53 |
<DetectChar char="$" attribute="Block" context="#pop"/> |
| 54 |
<StringDetect String="\stopformula" attribute="Error" context="#stay"/> |
| 55 |
<IncludeRules context="MathModeCommon"/> |
| 56 |
</context> |
| 57 |
<context name="MathModeMacroFind" attribute="Math" lineEndContext="#stay"> |
| 58 |
<DetectChar char="{" attribute="Brace" context="#pop!MathModeMacro"/> |
| 59 |
</context> |
| 60 |
<context name="MathModeMacro" attribute="Math" lineEndContext="#stay"> |
| 61 |
<DetectChar char="{" attribute="Brace" context="MathModeMacro"/> |
| 62 |
<DetectChar char="}" attribute="Brace" context="#pop"/> |
| 63 |
<DetectChar char="$" attribute="Error" context="#stay"/> |
| 64 |
<StringDetect String="\stopformula" attribute="Error" context="#stay"/> |
| 65 |
<IncludeRules context="MathModeCommon"/> |
| 66 |
</context> |
| 67 |
<context name="MathModeDisplay" attribute="Math" lineEndContext="#stay"> |
| 68 |
<Detect2Chars char="$" char1="$" attribute="Block" context="#pop"/> |
| 69 |
<DetectChar char="$" attribute="Error" context="#stay"/> |
| 70 |
<StringDetect String="\stopformula" attribute="Error" context="#stay"/> |
| 71 |
<IncludeRules context="MathModeCommon"/> |
| 72 |
</context> |
| 73 |
<context name="MathModeFormula" attribute="Math" lineEndContext="#stay"> |
| 74 |
<DetectChar char="$" attribute="Error" context="#stay"/> |
| 75 |
<StringDetect String="\stopformula" attribute="Block" context="#pop"/> |
| 76 |
<IncludeRules context="MathModeCommon"/> |
| 77 |
</context> |
| 78 |
<context name="MathModeCommon" attribute="Error" lineEndContext="#stay"> |
| 79 |
<AnyChar String="^_" attribute="Brace" context="#stay"/> |
| 80 |
<StringDetect String="\startformula" attribute="Error" context="#stay"/> |
| 81 |
<StringDetect String="\text" attribute="Block" context="MathModeTextFind"/> |
| 82 |
<IncludeRules context="Common"/> |
| 83 |
</context> |
| 84 |
<!--Math text--> |
| 85 |
<context name="MathModeTextFind" attribute="Normal Text" lineEndContext="#stay" > |
| 86 |
<DetectChar char="{" attribute="Brace" context="#pop!MathModeText"/> |
| 87 |
</context> |
| 88 |
<context name="MathModeText" attribute="Normal Text" lineEndContext="#stay" > |
| 89 |
<DetectChar char="{" attribute="Brace" context="MathModeText"/> |
| 90 |
<DetectChar char="}" attribute="Brace" context="#pop"/> |
| 91 |
<IncludeRules context="Normal Text"/> |
| 92 |
</context> |
| 93 |
|
| 94 |
<!--Verbatim TODO: \startC support--> |
| 95 |
<context name="Verbatim" attribute="Verbatim" lineEndContext="#stay"> |
| 96 |
<StringDetect String="\starttyping" attribute="Block" context="Verbatim"/> |
| 97 |
<StringDetect String="\stoptyping" attribute="Block" context="#pop"/> |
| 98 |
</context> |
| 99 |
|
| 100 |
<!--Common--> |
| 101 |
<context name="Common" attribute="Error" lineEndContext="#stay"> |
| 102 |
<DetectChar char="%" attribute="Comment" context="Comment"/> |
| 103 |
<RegExpr String="\\start(?:[a-zA-Z_]+)" attribute="Block" context="#stay" beginRegion="block"/> |
| 104 |
<RegExpr String="\\stop(?:[a-zA-Z_]+)" attribute="Block" context="#stay" endRegion="block"/> |
| 105 |
<StringDetect String="\bTABLEhead" attribute="Block" context="#stay" beginRegion="block"/> |
| 106 |
<StringDetect String="\bTABLEnext" attribute="Block" context="#stay" beginRegion="block"/> |
| 107 |
<StringDetect String="\bTABLEbody" attribute="Block" context="#stay" beginRegion="block"/> |
| 108 |
<StringDetect String="\bTABLEfoot" attribute="Block" context="#stay" beginRegion="block"/> |
| 109 |
<StringDetect String="\bTABLE" attribute="Block" context="#stay" beginRegion="block"/> |
| 110 |
<StringDetect String="\bTR" attribute="Block" context="#stay" beginRegion="block"/> |
| 111 |
<StringDetect String="\bTD" attribute="Block" context="#stay" beginRegion="block"/> |
| 112 |
<StringDetect String="\eTABLEhead" attribute="Block" context="#stay" endRegion="block"/> |
| 113 |
<StringDetect String="\eTABLEnext" attribute="Block" context="#stay" endRegion="block"/> |
| 114 |
<StringDetect String="\eTABLEbody" attribute="Block" context="#stay" endRegion="block"/> |
| 115 |
<StringDetect String="\eTABLEfoot" attribute="Block" context="#stay" endRegion="block"/> |
| 116 |
<StringDetect String="\eTABLE" attribute="Block" context="#stay" endRegion="block"/> |
| 117 |
<StringDetect String="\eTR" attribute="Block" context="#stay" endRegion="block"/> |
| 118 |
<StringDetect String="\eTD" attribute="Block" context="#stay" endRegion="block"/> |
| 119 |
<DetectChar char="\" attribute="Macro" context="Macro"/> |
| 120 |
<DetectChar char="{" attribute="Brace" context="#stay" beginRegion="block"/> |
| 121 |
<DetectChar char="}" attribute="Brace" context="#stay" endRegion="block"/> |
| 122 |
</context> |
| 123 |
</contexts> |
| 124 |
|
| 125 |
<itemDatas> |
| 126 |
<itemData name="Normal Text" defStyleNum="dsNormal" /><!--(Hi, I’m text)--> |
| 127 |
<itemData name="Comment" defStyleNum="dsComment" /><!--(%Comment)--> |
| 128 |
<itemData name="Section" defStyleNum="dsKeyword" /><!--\section{(Fancy!)}--> |
| 129 |
<itemData name="Brace" defStyleNum="dsChar" spellChecking="false"/><!--({})--> |
| 130 |
<itemData name="Math" defStyleNum="dsOthers" spellChecking="false"/><!--($5$)--> |
| 131 |
<itemData name="Macro" defStyleNum="dsFunction" spellChecking="false"/><!--(\foo)--> |
| 132 |
<itemData name="Block" defStyleNum="dsRegionMarker" spellChecking="false"/><!--\start(bar), \stop(bar)--> |
| 133 |
<itemData name="Error" defStyleNum="dsError" spellChecking="false"/><!--$($$)--> |
| 134 |
<itemData name="Verbatim" defStyleNum="dsString" spellChecking="false"/><!--\starttyping(eggs)\stoptyping, \definetyping[C] \startC(umm…)\stopC--> |
| 135 |
</itemDatas> |
| 136 |
</highlighting> |
| 137 |
|
| 138 |
<general> |
| 139 |
<keywords weakDeliminator="\" wordWrapDeliminator=",{}[]"/> |
| 140 |
<comments> |
| 141 |
<comment name="singleLine" start="%" /> |
| 142 |
</comments> |
| 143 |
</general> |
| 144 |
|
| 145 |
<spellchecking> |
| 146 |
<encodings> |
| 147 |
<encoding string="''" ignored="true" /> |
| 148 |
</encodings> |
| 149 |
</spellchecking> |
| 150 |
</language> |
| 151 |
|
| 152 |
<!-- kate: space-indent off; indent-width 4; --> |