Warning, /frameworks/syntax-highlighting/data/syntax/context.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language>
0003 <language
0004         name="ConTeXt"
0005         version="10"
0006         section="Markup"
0007         kateversion="5.0"
0008         priority="8"
0009         extensions="*.ctx;*.mkiv;*.mkvi;*.mkxl;*.mklx"
0010         mimetype="text/x-tex"
0011         casesensitive="1"
0012         author="Philipp A. (flying-sheep@web.de)"
0013         license="GPL"
0014 >
0015         <highlighting>
0016                 <list name="titles">
0017                         <item>\part</item>
0018                         <item>\chapter</item>
0019                         <item>\section</item>
0020                         <item>\subsection</item>
0021                         <item>\subsubsection</item>
0022                         <item>\title</item>
0023                         <item>\subject</item>
0024                         <item>\subsubject</item>
0025                         <item>\subsubsubject</item>
0026                 </list>
0027                 <contexts>
0028                         <!-- Normal text -->
0029                         <context name="Normal Text" attribute="Normal Text" lineEndContext="#stay">
0030                                 <Detect2Chars char="$" char1="$"     attribute="Block" context="MathModeDisplay"/>
0031                                 <DetectChar   char="$"               attribute="Block" context="MathMode"/>
0032                                 <StringDetect String="\mathematics"  attribute="Block" context="MathModeMacroFind"/>
0033                                 <StringDetect String="\math"         attribute="Block" context="MathModeMacroFind"/>
0034                                 <Detect2Chars char="\" char1="m"     attribute="Block" context="MathModeMacroFind"/>
0035                                 <StringDetect String="\startformula" attribute="Block" context="MathModeFormula"/>
0036                                 <StringDetect String="\starttyping"  attribute="Block" context="Verbatim"/>
0037                                 <keyword String="titles"             attribute="Section" context="#stay"/>
0038                                 <IncludeRules context="Common"/>
0039                         </context>
0040 
0041                         <!-- Macro -->
0042                         <context name="Macro" attribute="Macro" lineEndContext="#stay">
0043                                 <RegExpr String="[a-zA-Z_]+[a-zA-Z@_]*|[^a-zA-Z_]" attribute="Macro" context="#pop"/>
0044                         </context>
0045 
0046                         <!-- Comment -->
0047                         <context name="Comment" attribute="Comment" lineEndContext="#pop">
0048                                 <IncludeRules context="##Comments"/>
0049                         </context>
0050 
0051                         <!-- Math Modes -->
0052                         <context name="MathMode" attribute="Math" lineEndContext="#pop">
0053                                 <DetectChar   char="$"               attribute="Block" context="#pop"/>
0054                                 <StringDetect String="\stopformula"  attribute="Error" context="#stay"/>
0055                                 <IncludeRules context="MathModeCommon"/>
0056                         </context>
0057                         <context name="MathModeMacroFind" attribute="Math" lineEndContext="#stay">
0058                                 <DetectChar   char="{"               attribute="Brace" context="#pop!MathModeMacro"/>
0059                         </context>
0060                         <context name="MathModeMacro" attribute="Math" lineEndContext="#stay">
0061                                 <DetectChar   char="{"               attribute="Brace" context="MathModeMacro"/>
0062                                 <DetectChar   char="}"               attribute="Brace" context="#pop"/>
0063                                 <DetectChar   char="$"               attribute="Error" context="#stay"/>
0064                                 <StringDetect String="\stopformula"  attribute="Error" context="#stay"/>
0065                                 <IncludeRules context="MathModeCommon"/>
0066                         </context>
0067                         <context name="MathModeDisplay" attribute="Math" lineEndContext="#stay">
0068                                 <Detect2Chars char="$" char1="$"     attribute="Block" context="#pop"/>
0069                                 <DetectChar   char="$"               attribute="Error" context="#stay"/>
0070                                 <StringDetect String="\stopformula"  attribute="Error" context="#stay"/>
0071                                 <IncludeRules context="MathModeCommon"/>
0072                         </context>
0073                         <context name="MathModeFormula" attribute="Math" lineEndContext="#stay">
0074                                 <DetectChar   char="$"               attribute="Error" context="#stay"/>
0075                                 <StringDetect String="\stopformula"  attribute="Block" context="#pop"/>
0076                                 <IncludeRules context="MathModeCommon"/>
0077                         </context>
0078                         <context name="MathModeCommon" attribute="Error" lineEndContext="#stay">
0079                                 <AnyChar      String="^_"            attribute="Brace" context="#stay"/>
0080                                 <StringDetect String="\startformula" attribute="Error" context="#stay"/>
0081                                 <StringDetect String="\text"         attribute="Block" context="MathModeTextFind"/>
0082                                 <IncludeRules context="Common"/>
0083                         </context>
0084                         <!--Math text-->
0085                         <context name="MathModeTextFind" attribute="Normal Text" lineEndContext="#stay" >
0086                                 <DetectChar char="{" attribute="Brace" context="#pop!MathModeText"/>
0087                         </context>
0088                         <context name="MathModeText" attribute="Normal Text" lineEndContext="#stay" >
0089                                 <DetectChar char="{" attribute="Brace" context="MathModeText"/>
0090                                 <DetectChar char="}" attribute="Brace" context="#pop"/>
0091                                 <IncludeRules context="Normal Text"/>
0092                         </context>
0093 
0094                         <!--Verbatim TODO: \startC support-->
0095                         <context name="Verbatim" attribute="Verbatim" lineEndContext="#stay">
0096                                 <StringDetect String="\starttyping"  attribute="Block" context="Verbatim"/>
0097                                 <StringDetect String="\stoptyping"  attribute="Block" context="#pop"/>
0098                         </context>
0099 
0100                         <!--Common-->
0101                         <context name="Common" attribute="Error" lineEndContext="#stay">
0102                                 <DetectChar char="%" attribute="Comment" context="Comment"/>
0103                                 <RegExpr String="\\start(?:[a-zA-Z_]+)" attribute="Block" context="#stay" beginRegion="block"/>
0104                                 <RegExpr String="\\stop(?:[a-zA-Z_]+)"  attribute="Block" context="#stay" endRegion="block"/>
0105                                 <StringDetect String="\bTABLEhead" attribute="Block" context="#stay" beginRegion="block"/>
0106                                 <StringDetect String="\bTABLEnext" attribute="Block" context="#stay" beginRegion="block"/>
0107                                 <StringDetect String="\bTABLEbody" attribute="Block" context="#stay" beginRegion="block"/>
0108                                 <StringDetect String="\bTABLEfoot" attribute="Block" context="#stay" beginRegion="block"/>
0109                                 <StringDetect String="\bTABLE" attribute="Block" context="#stay" beginRegion="block"/>
0110                                 <StringDetect String="\bTR" attribute="Block" context="#stay" beginRegion="block"/>
0111                                 <StringDetect String="\bTD" attribute="Block" context="#stay" beginRegion="block"/>
0112                                 <StringDetect String="\eTABLEhead" attribute="Block" context="#stay" endRegion="block"/>
0113                                 <StringDetect String="\eTABLEnext" attribute="Block" context="#stay" endRegion="block"/>
0114                                 <StringDetect String="\eTABLEbody" attribute="Block" context="#stay" endRegion="block"/>
0115                                 <StringDetect String="\eTABLEfoot" attribute="Block" context="#stay" endRegion="block"/>
0116                                 <StringDetect String="\eTABLE" attribute="Block" context="#stay" endRegion="block"/>
0117                                 <StringDetect String="\eTR" attribute="Block" context="#stay" endRegion="block"/>
0118                                 <StringDetect String="\eTD" attribute="Block" context="#stay" endRegion="block"/>
0119                                 <DetectChar char="\" attribute="Macro"   context="Macro"/>
0120                                 <DetectChar char="{" attribute="Brace"   context="#stay" beginRegion="block"/>
0121                                 <DetectChar char="}" attribute="Brace"   context="#stay" endRegion="block"/>
0122                         </context>
0123                 </contexts>
0124 
0125                 <itemDatas>
0126                         <itemData name="Normal Text" defStyleNum="dsNormal"                            /><!--(Hi, I’m text)-->
0127                         <itemData name="Comment"     defStyleNum="dsComment"                           /><!--(%Comment)-->
0128                         <itemData name="Section"     defStyleNum="dsKeyword"                           /><!--\section{(Fancy!)}-->
0129                         <itemData name="Brace"       defStyleNum="dsChar"         spellChecking="false"/><!--({})-->
0130                         <itemData name="Math"        defStyleNum="dsOthers"       spellChecking="false"/><!--($5$)-->
0131                         <itemData name="Macro"       defStyleNum="dsFunction"     spellChecking="false"/><!--(\foo)-->
0132                         <itemData name="Block"       defStyleNum="dsRegionMarker" spellChecking="false"/><!--\start(bar), \stop(bar)-->
0133                         <itemData name="Error"       defStyleNum="dsError"        spellChecking="false"/><!--$($$)-->
0134                         <itemData name="Verbatim"    defStyleNum="dsString"       spellChecking="false"/><!--\starttyping(eggs)\stoptyping, \definetyping[C] \startC(umm…)\stopC-->
0135                 </itemDatas>
0136         </highlighting>
0137 
0138         <general>
0139                 <keywords weakDeliminator="\" wordWrapDeliminator=",{}[]"/>
0140                 <comments>
0141                         <comment name="singleLine" start="%" />
0142                 </comments>
0143         </general>
0144 
0145         <spellchecking>
0146                 <encodings>
0147                         <encoding string="''" ignored="true" />
0148                 </encodings>
0149         </spellchecking>
0150 </language>
0151 
0152 <!-- kate: space-indent off; indent-width 4; -->