Commit 8ebfc703 authored by Christoph Cullmann's avatar Christoph Cullmann

import latest syntax files, move update script top-level + update docs

parent 8a522a87
......@@ -21,14 +21,11 @@ The command will print the URL to use for local previewing.
# Update the syntax-highlighting framework update sites
Go to the update site location
cd static/syntax
Run the update regeneration script, that will pull in the necessary stuff from anongit.kde.org
./update.pl
./update-syntax.pl
Afterwards, check the files that were added to your local git clone and commit/push if that looks ok.
(all files updated shall be in static/syntax/...)
This needs to be done after each frameworks release.
cmake_minimum_required(VERSION 3.5)
set(KF5_VERSION "5.61.0")
set(KF5_VERSION "5.62.0")
project(KSyntaxHighlighting VERSION ${KF5_VERSION})
find_package(ECM 5.61.0 REQUIRED NO_MODULE)
......@@ -9,6 +9,10 @@ if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(FeatureSummary)
include(GenerateExportHeader)
include(ECMSetupVersion)
......@@ -17,9 +21,6 @@ include(ECMGeneratePriFile)
include(CMakePackageConfigHelpers)
include(ECMPoQmTools)
include(ECMQtDeclareLoggingCategory)
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMMarkNonGuiExecutable)
include(ECMAddQch)
include(ECMOptionalAddSubdirectory)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="LaTeX" version="8" section="Markup" kateversion="5.0" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" 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 (thomas.braun@virtuell-zuhause.de)" license="LGPL" >
<!DOCTYPE language SYSTEM "language.dtd"
[
<!ENTITY bullet "&#xd7;">
<!ENTITY envname "[a-zA-Z]+\*?">
]>
<language name="LaTeX" version="9" section="Markup" kateversion="5.0" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" 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 (thomas.braun@virtuell-zuhause.de)" license="LGPL" >
<highlighting>
<list name="beginEnv">
<item>\begin</item>
</list>
<list name="endEnv">
<item>\end</item>
</list>
<list name="Label">
<item>\Autocite</item>
<item>\autocite</item>
<item>\autoref</item>
<item>\Cite</item>
<item>\cite</item>
<item>\Citeauthor</item>
<item>\citeauthor</item>
<item>\citep</item>
<item>\citet</item>
<item>\citetitle</item>
<item>\citeurl</item>
<item>\citeyear</item>
<item>\cref</item>
<item>\Cref</item>
<item>\cref*</item>
<item>\Cref*</item>
<item>\eqref</item>
<item>\Footcite</item>
<item>\footcite</item>
<item>\footfullcite</item>
<item>\fullcite</item>
<item>\label</item>
<item>\nocite</item>
<item>\pagecite</item>
<item>\pageref</item>
<item>\Parencite</item>
<item>\parencite</item>
<item>\ref</item>
<item>\subref</item>
<item>\subref*</item>
<item>\supercite</item>
<item>\Textcite</item>
<item>\textcite</item>
<item>\vpageref</item>
<item>\vref</item>
</list>
<list name="macroFancyLabel">
<item>\documentclass</item>
<item>\includegraphics</item>
<item>\include</item>
<item>\usepackage</item>
<item>\bibliography</item>
<item>\bibliographystyle</item>
</list>
<list name="FancyLabel">
<item>\cites</item>
<item>\Cites</item>
<item>\parencites</item>
<item>\Parencites</item>
<item>\autocites</item>
<item>\Autocites</item>
<item>\supercites</item>
<item>\footcites</item>
<item>\Footcites</item>
</list>
<list name="Sectioning">
<item>\part*</item>
<item>\part</item>
<item>\chapter*</item>
<item>\chapter</item>
<item>\section*</item>
<item>\section</item>
<item>\subsection*</item>
<item>\subsection</item>
<item>\subsubsection*</item>
<item>\subsubsection</item>
<item>\paragraph*</item>
<item>\paragraph</item>
<item>\subparagraph*</item>
<item>\subparagraph</item>
</list>
<list name="SpecialCommand">
<item>\column</item>
<item>\definecolor</item>
<item>\geometry</item>
<item>\hspace*</item>
<item>\hspace</item>
<item>\input</item>
<item>\newboolean</item>
<item>\rule</item>
<item>\setboolean</item>
<item>\setcounter</item>
<item>\setlength</item>
<item>\special</item>
<item>\textcolor</item>
<item>\vspace*</item>
<item>\vspace</item>
</list>
<list name="Footnoting">
<item>\footnote*</item>
<item>\footnote</item>
</list>
<list name="NewCommand">
<item>\renewcommand*</item>
<item>\renewcommand</item>
<item>\providecommand*</item>
<item>\providecommand</item>
<item>\newcommand*</item>
<item>\newcommand</item>
</list>
<list name="DefCommand">
<item>\edef</item>
<item>\gdef</item>
<item>\xdef</item>
</list>
<list name="MathModeEnsure">
<item>\ensuremath</item>
</list>
<list name="iffalse">
<item>\iffalse</item>
</list>
<list name="iffalseend">
<item>\fi</item>
<item>\else</item>
</list>
<list name="Verb">
<item>verb*</item>
<item>verb</item>
<item>Verb</item>
</list>
<list name="Lstinline">
<item>lstinline</item>
</list>
<list name="MintParam">
<item>mint</item>
</list>
<list name="ListingsEnv">
<item>lstlisting*</item>
<item>lstlisting</item>
</list>
<list name="MintedEnv">
<item>minted*</item>
<item>minted</item>
</list>
<list name="VerbatimEnv">
<item>Verbatim*</item>
<item>Verbatim</item>
<item>BVerbatim*</item>
<item>BVerbatim</item>
<item>LVerbatim*</item>
<item>LVerbatim</item>
<item>verbatim*</item>
<item>verbatim</item>
<item>boxedverbatim*</item>
<item>boxedverbatim</item>
</list>
<list name="CommentEnv">
<item>comment*</item>
<item>comment</item>
</list>
<list name="MathEnvParam">
<item>alignat*</item>
<item>alignat</item>
<item>xalignat*</item>
<item>xalignat</item>
<item>xxalignat*</item>
<item>xxalignat</item>
</list>
<list name="MathEnv">
<item>Bmatrix*</item>
<item>Bmatrix</item>
<item>IEEEeqnarray*</item>
<item>IEEEeqnarray</item>
<item>IEEEeqnarraybox*</item>
<item>IEEEeqnarraybox</item>
<item>Vmatrix*</item>
<item>Vmatrix</item>
<item>align*</item>
<item>align</item>
<item>bmatrix*</item>
<item>bmatrix</item>
<item>cases*</item>
<item>cases</item>
<item>displaymath*</item>
<item>displaymath</item>
<item>eqnarray*</item>
<item>eqnarray</item>
<item>equation*</item>
<item>equation</item>
<item>flalign*</item>
<item>flalign</item>
<item>gather*</item>
<item>gather</item>
<item>math*</item>
<item>math</item>
<item>multline*</item>
<item>multline</item>
<item>pmatrix*</item>
<item>pmatrix</item>
<item>smallmatrix*</item>
<item>smallmatrix</item>
<item>subeqnarray*</item>
<item>subeqnarray</item>
<item>vmatrix*</item>
<item>vmatrix</item>
</list>
<list name="TabEnv">
<item>tabularx*</item>
<item>tabularx</item>
<item>tabular*</item>
<item>tabular</item>
<item>supertabular*</item>
<item>supertabular</item>
<item>mpsupertabular*</item>
<item>mpsupertabular</item>
<item>xtabular*</item>
<item>xtabular</item>
<item>mpxtabular*</item>
<item>mpxtabular</item>
<item>longtable*</item>
<item>longtable</item>
</list>
<list name="MathModeText">
<item>\text</item>
<item>\textit</item>
<item>\textbf</item>
<item>\textmd</item>
<item>\textsl</item>
<item>\textsc</item>
<item>\textrm</item>
<item>\textsf</item>
<item>\texttt</item>
<item>\textup</item>
<item>\textlf</item>
<item>\textnormal</item>
<item>\shortintertext</item>
<item>\intertext</item>
<item>\mbox</item>
<item>\emph</item>
</list>
<list name="ResetHL">
<item>\KileResetHL</item>
<item>\KateResetHL</item>
</list>
<contexts>
<!-- Normal text -->
<context name="Normal Text" attribute="Normal Text" lineEndContext="#stay">
<RegExpr String="\\begin(?=[^a-zA-Z])" attribute="Structure" context="FindBeginEnvironment" beginRegion="block" />
<RegExpr String="\\end(?=[^a-zA-Z])" attribute="Structure" context="FindEndEnvironment" />
<RegExpr String="\\(cite|citet|citep|parencite|autocite|Autocite|citetitle)\*(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
<RegExpr String="\\(documentclass|includegraphics|include|usepackage|bibliography|bibliographystyle)(?=[^a-zA-Z])" attribute="Builtin Macro" context="FancyLabel"/>
<RegExpr String="\\(cites|Cites|parencites|Parencites|autocites|Autocites|supercites|footcites|Footcites)(?=[^a-zA-Z])" attribute="Structure" context="FancyLabel"/>
<RegExpr String="\\(cite|citet|citep|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|eqref)(?=[^a-zA-Z])" attribute="Structure" context="Label"/>
<RegExpr String="\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)\*?\s*(?=[\{\[])" attribute="Structure" context="Sectioning"/>
<RegExpr String="\\(input|hspace|hspace\*|vspace|vspace\*|rule|special|setlength|newboolean|setboolean|setcounter|geometry|textcolor|definecolor|column)(?=[^a-zA-Z])" attribute="Macro" context="SpecialCommand"/>
<RegExpr String="\\(footnote)\*?\s*(?=[\{\[])" attribute="Macro" context="Footnoting"/>
<RegExpr String="\\(renewcommand|providenewcommand|newcommand)\*?(?=[^a-zA-Z])" attribute="Macro" context="NewCommand"/>
<RegExpr String="\\(e|g|x)?def(?=[^a-zA-Z])" attribute="Macro" context="DefCommand"/>
<RegExpr String="&lt;&lt;.*&gt;&gt;=" attribute="Normal Text" context="NoWeb" />
<StringDetect String="\(" attribute="Math" context="MathMode" />
<StringDetect String="\[" attribute="Math" context="MathModeEquation" beginRegion="mathMode" />
<WordDetect String="\iffalse" attribute="Comment" context="Multiline Comment"/>
<StringDetect String="\ensuremath{" attribute="Math" context="MathModeEnsure"/>
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<StringDetect String="$$" attribute="Math" context="MathModeDisplay" beginRegion="mathMode" />
<DetectChar char="$" attribute="Math" context="MathMode" />
<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" />
<DetectSpaces/>
<DetectIdentifier/>
<DetectChar char="\" attribute="Normal Text" context="LatexMacro" lookAhead="true"/>
<DetectChar char="$" attribute="Math" context="MathModeTex"/>
<RegExpr String="&lt;&lt;.*&gt;&gt;=" attribute="Normal Text" context="NoWeb" column="0"/>
<RegExpr String="%\s*(BEGIN|END)" attribute="Region Marker" context="RegionComment" firstNonSpace="true"/>
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
</context>
<context name="LatexMacro" attribute="Normal Text" lineEndContext="#pop">
<keyword String="beginEnv" attribute="Structure" context="#pop!FindBeginEnvironment" beginRegion="block"/>
<keyword String="endEnv" attribute="Structure" context="#pop!FindEndEnvironment" endRegion="block"/>
<keyword String="Label" attribute="Structure" context="#pop!Label"/>
<keyword String="macroFancyLabel" attribute="Builtin Macro" context="#pop!FancyLabel"/>
<keyword String="FancyLabel" attribute="Structure" context="#pop!FancyLabel"/>
<keyword String="Sectioning" attribute="Structure" context="#pop!Sectioning"/>
<keyword String="SpecialCommand" attribute="Macro" context="#pop!SpecialCommand"/>
<keyword String="Footnoting" attribute="Macro" context="#pop!Footnoting"/>
<keyword String="NewCommand" attribute="Macro" context="#pop!NewCommand"/>
<keyword String="DefCommand" attribute="Macro" context="#pop!DefCommand"/>
<Detect2Chars char="\" char1="(" attribute="Math" context="#pop!MathModeLatex"/>
<Detect2Chars char="\" char1="[" attribute="Math" context="#pop!MathModeLatexEquation" beginRegion="mathMode"/>
<keyword String="MathModeEnsure" attribute="Math" context="#pop!MathModeEnsure"/>
<keyword String="iffalse" attribute="Comment" context="#pop!Multiline Comment"/>
<DetectChar char="\" attribute="Macro" context="#pop!ContrSeq"/>
</context>
<!-- NoWeb -->
<context name="NoWeb" attribute="Normal Text" lineEndContext="#stay" >
<RegExpr String="^\s*@\s*" attribute="Normal Text" context="#pop" />
<!-- NoWeb -->
<context name="NoWeb" attribute="Normal Text" lineEndContext="#stay">
<RegExpr String="@\s*$" attribute="Normal Text" context="#pop" column="0"/>
</context>
<!-- LaTeX sectioning commands -->
<context name="Sectioning" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<RegExpr String="\[[^\]]*\]" attribute="Normal Text" context="#stay"/>
<DetectChar char=" " attribute="Normal Text" context="#stay"/>
<DetectSpaces/>
<RangeDetect char="[" char1="]" attribute="Normal Text" context="#stay"/>
<DetectChar char="{" attribute="Normal Text" context="SectioningInside"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
<DetectChar char="%" attribute="Comment" context="Comment"/>
......@@ -47,36 +319,34 @@
<context name="SectioningInside" attribute="Sectioning Text" lineEndContext="#stay">
<DetectChar char="{" attribute="Normal Text" context="SectioningInside"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
<StringDetect String="\(" attribute="Sectioning Math" context="SectioningMathMode" />
<Detect2Chars char="\" char1="(" attribute="Sectioning Math" context="SectioningMathMode" />
<DetectChar char="\" attribute="Sectioning Macro" context="SectioningContrSeq"/>
<DetectChar char="$" attribute="Sectioning Math" context="SectioningMathMode" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
</context>
<context name="SectioningContrSeq" attribute="Macro" lineEndContext="#pop">
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="[a-zA-Z]+(\+?|\*{0,3})" attribute="Sectioning Macro" context="#pop"/>
<RegExpr String="[^a-zA-Z]" attribute="Sectioning Macro" context="#pop" />
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<RegExpr String="[a-zA-Z]+(\+?|\*{0,3})|." attribute="Sectioning Macro" context="#pop" />
</context>
<context name="SectioningMathMode" attribute="Sectioning Math" lineEndContext="#stay">
<StringDetect String="$$" attribute="Error" context="#stay" />
<Detect2Chars char="$" char1="$" attribute="Error" context="#stay" />
<DetectChar char="$" attribute="Sectioning Math" context="#pop" />
<Detect2Chars char="\" char1=")" attribute="Sectioning Math" context="#pop" />
<Detect2Chars char="\" char1="]" attribute="Error" context="#stay" />
<DetectChar char="\" attribute="Sectioning Macro Mathmode" context="SectioningMathContrSeq"/>
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
</context>
<context name="SectioningMathContrSeq" attribute="Sectioning Macro Mathmode" lineEndContext="#pop">
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="[a-zA-Z]+\*?" attribute="Sectioning Macro Mathmode" context="#pop"/>
<RegExpr String="[^a-zA-Z]" attribute="Sectioning Macro Mathmode" context="#pop" />
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<RegExpr String="&envname;|." attribute="Sectioning Macro 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"/>
<DetectSpaces/>
<RangeDetect char="[" char1="]" 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"/>
......@@ -84,54 +354,39 @@
<context name="FootnotingInside" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char="{" attribute="Normal Text" context="FootnotingInside"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
<StringDetect String="\(" attribute="Math" context="FootnotingMathMode" />
<DetectChar char="$" attribute="Math" context="FootnotingMathMode" />
<IncludeRules context="Normal Text" />
</context>
<context name="FootnotingMathMode" attribute="Math" lineEndContext="#stay">
<StringDetect String="$$" attribute="Error" context="#stay" />
<DetectChar char="$" attribute="Math" context="#pop" />
<Detect2Chars char="\" char1=")" attribute="Math" context="#pop" />
<Detect2Chars char="\" char1="]" attribute="Error" context="#stay" />
<IncludeRules context="MathMode" />
<IncludeRules context="Normal Text"/>
</context>
<!-- LaTeX commands \newcommand and \renewcommand -->
<context name="NewCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<RegExpr String="\s*\{\s*" attribute="Normal Text" context="LabelParameter"/>
<RegExpr String="\s*(\[\d\](\[[^\]]*\])?)?\{" attribute="Normal Text" context="LabelParameter"/>
<DetectSpaces/>
<DetectChar char="{" attribute="Normal Text" context="LabelParameter"/>
<RegExpr String="(\[\d\](\[[^\]]*\])?)?\{" attribute="Normal Text" context="LabelParameter"/>
<DetectChar char="}" attribute="Error" context="#pop"/>
</context>
<!-- LaTeX command \def -->
<context name="DefCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<RegExpr String="\s*\\[a-zA-Z]+[^\{]*\{" attribute="Normal Text" context="CommandParameterStart"/>
<DetectSpaces/>
<RegExpr String="\\[a-zA-Z]+[^\{]*\{" attribute="Normal Text" context="#pop!CommandParameter"/>
<DetectChar char="}" attribute="Error" context="#pop"/>
</context>
<!-- parse command argument -->
<context name="CommandParameterStart" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char="{" attribute="Normal Text" context="CommandParameter"/>
<DetectChar char="}" attribute="Normal Text" context="#pop#pop"/>
<RegExpr String="\\." attribute="Normal Text" context="#stay" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
</context>
<context name="CommandParameter" attribute="Normal Text" lineEndContext="#stay">
<DetectChar char="{" attribute="Normal Text" context="CommandParameter"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
<RegExpr String="\\." attribute="Normal Text" context="#stay" />
<RegExpr String="\\." attribute="Normal Text" context="#stay"/>
<DetectChar char="%" attribute="Comment" context="Comment"/>
</context>
<!-- LaTeX command in text mode -->
<context name="ContrSeq" attribute="Macro" lineEndContext="#pop">
<StringDetect String="verb*" attribute="Macro" context="Verb"/>
<RegExpr String="(Verb|verb)(?=[^a-zA-Z])" attribute="Macro" context="Verb"/>
<RegExpr String="(lstinline)(?=[^a-zA-Z])" attribute="Macro" context="Lstinline"/>
<RegExpr String="mint(?=[^a-zA-Z])" attribute="Macro" context="MintParam"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="[a-zA-Z@]+(\+?|\*{0,3})" attribute="Macro" context="#pop"/>
<RegExpr String="[^a-zA-Z]" attribute="Macro" context="#pop" />
<keyword String="Verb" attribute="Macro" context="Verb"/>
<keyword String="Lstinline" attribute="Macro" context="Lstinline"/>
<keyword String="MintParam" attribute="Macro" context="MintParam"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<RegExpr String="[a-zA-Z@]+(\+?|\*{0,3})|." attribute="Macro" context="#pop" />
</context>
<!-- \mint command with parameter-->
......@@ -147,92 +402,97 @@
</context>
<context name="VerbEnd" attribute="Verbatim" lineEndContext="#pop#pop#pop" dynamic="true" >
<StringDetect String="%1" attribute="Normal Text" context="#pop#pop#pop" dynamic="true" />
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<RegExpr String="[^%1\xd7]*" attribute="Verbatim" context="#stay" dynamic="true" />
</context>
<!-- lstinline command, different from verb as it takes options -->
<context name="Lstinline" attribute="Verbatim" lineEndContext="#pop#pop" >
<RegExpr String="\s*\[\s*" attribute="Normal Text" context="FancyLabelOption"/>
<RegExpr String="\s*\{\s*" attribute="Normal Text" context="LstinlineParameter"/>
<DetectSpaces/>
<DetectChar char="[" attribute="Normal Text" context="FancyLabelOption"/>
<DetectChar char="{" attribute="Normal Text" context="LstinlineParameter"/>
<RegExpr String="(.)" attribute="Normal Text" dynamic="true" context="LstinlineEnd" />
</context>
<context name="LstinlineEnd" attribute="Verbatim" lineEndContext="#pop#pop#pop" dynamic="true" >
<!-- TODO DetectChar segfault -->
<StringDetect String="%1" attribute="Normal Text" context="#pop#pop#pop" dynamic="true" />
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<RegExpr String="[^%1\xd7]*" attribute="Verbatim" context="#stay" dynamic="true" />
</context>
<context name="LstinlineParameter" attribute="Verbatim" lineEndContext="#stay">
<RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop#pop#pop"/>
<DetectSpaces/>
<DetectChar char="}" attribute="Normal Text" context="#pop#pop#pop"/>
</context>
<!-- label -->
<context name="Label" attribute="Normal Text" lineEndContext="#stay">
<RegExpr String="\s*\{\s*" attribute="Normal Text" context="LabelParameter"/>
<RegExpr String="\s*\[\s*" attribute="Normal Text" context="LabelOption"/>
<RegExpr String="[^\[\{]+" attribute="Error" context="#stay"/>
<DetectSpaces/>
<DetectChar char="{" attribute="Normal Text" context="LabelParameter"/>
<DetectChar char="[" attribute="Normal Text" context="LabelOption"/>
</context>
<context name="LabelOption" attribute="Normal Text" lineEndContext="#stay">
<StringDetect String="\(" attribute="Math" context="MathMode" />
<DetectSpaces/>
<DetectChar char="(" attribute="Math" context="MathModeTex" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathMode" />
<DetectChar char="$" attribute="Math" context="MathModeTex" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\]\s*" attribute="Normal Text" context="#pop"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<DetectChar char="]" attribute="Normal Text" context="#pop"/>
</context>
<context name="LabelParameter" attribute="Environment" lineEndContext="#stay">
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop#pop"/>
<context name="LabelParameter" attribute="Reference" lineEndContext="#stay">
<DetectSpaces/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<DetectChar char="}" 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="FancyLabelOption"/>
<RegExpr String="\s*\(\s*" attribute="Normal Text" context="FancyLabelRoundBrackets"/>
<DetectSpaces/>
<DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/>
<DetectChar char="[" attribute="Normal Text" context="FancyLabelOption"/>
<DetectChar char="(" attribute="Normal Text" context="FancyLabelRoundBrackets"/>
</context>
<context name="FancyLabelParameter" attribute="Environment" lineEndContext="#stay">
<StringDetect String="\(" attribute="Math" context="MathMode" />
<DetectSpaces/>
<DetectChar char="(" attribute="Math" context="MathModeTex" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathMode" />
<DetectChar char="$" attribute="Math" context="MathModeTex" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
</context>
<context name="FancyLabelOption" attribute="Option Text" lineEndContext="#stay">
<StringDetect String="\(" attribute="Math" context="MathMode" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathMode" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\]\s*" attribute="Normal Text" context="#pop"/>
<IncludeRules context="LabelOption"/>
</context>
<context name="FancyLabelRoundBrackets" attribute="Normal Text" lineEndContext="#stay">
<StringDetect String="\(" attribute="Math" context="MathMode" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathMode" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\)\s*" attribute="Normal Text" context="#pop"/>
<DetectSpaces/>
<Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathModeTex" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<DetectChar char=")" attribute="Normal Text" context="#pop"/>
</context>
<!-- Special commands -->
<context name="SpecialCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<RegExpr String="\s*\{\s*" attribute="Normal Text" context="SpecialCommandParameterOption"/>
<DetectSpaces/>
<DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/>
</context>
<context name="SpecialCommandParameterOption" attribute="Option Text" lineEndContext="#stay">
<StringDetect String="\(" attribute="Math" context="MathMode" />
<DetectSpaces/>
<Detect2Chars char="\" char1="(" attribute="Math" context="MathModeTex" />
<DetectChar char="\" attribute="Macro" context="ContrSeq"/>
<DetectChar char="$" attribute="Math" context="MathMode" />
<DetectChar char="$" attribute="Math" context="MathModeTex" />
<DetectChar char="%" attribute="Comment" context="Comment"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>
<RegExpr String="\s*\}\s*" attribute="Normal Text" context="#pop"/>
<DetectChar char="&bullet;" attribute="Bullet" context="#stay"/>
<DetectChar char="}" attribute="Normal Text" context="#pop"/>
</context>
<!-- end of an environment -->
......@@ -242,305 +502,455 @@
</context>
<context name="EndEnvironment" attribute="Environment" lineEndContext="#stay">
<RegExpr String="[a-zA-Z]" attribute="Environment" context="EndLatexEnv"/>
<RegExpr String="\s+" attribute="Error" context="#pop"/>
<RegExpr String="[^a-zA-Z]" attribute="Error" context="#pop"/>
<RegExpr String="&envname;" attribute="Environment" context="LatexEnvEnd"/>
<RegExpr String="." attribute="Error" context="#pop#pop"/>
</context>
<context name="EndLatexEnv" attribute="Environment" lineEndContext="#stay">
<context name="LatexEnvEnd" attribute="Environment" lineEndContext="#stay">
<DetectChar char="}" attribute="Normal Text" endRegion="block" context="#pop#pop#pop"/>
<RegExpr String="[a-zA-Z]+(\*)?" attribute="Environment" context="#stay"/>
<RegExpr String="\s+" attribute="Error" context="#stay"/>
<RegExpr String="[a-zA-Z]" attribute="Error" context="#pop#pop#pop"/>
<RegExpr String="[^}]*" attribute="Error" context="#stay"/>
</context>
<!-- start of an environment -->
<context name="FindBeginEnvironment" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces/>
<DetectChar char="{" attribute="Normal Text" context="BeginEnvironment"/>
<RegExpr String="\S" attribute="Normal Text" context="#pop"/>
<RegExpr String="." attribute="Normal Text" context="#pop"/>
</context>
<!-- filter the environment name and check the type -->
<context name="BeginEnvironment" attribute="Environment" lineEndContext="#stay">
<WordDetect String="lstlisting" attribute="Environment" context="ListingsEnvParam"/>
<WordDetect String="minted" attribute="Environment" context="MintedEnvParam"/>
<RegExpr String="((B|L)?Verbatim)" attribute="Environment" context="VerbatimEnvParam"/>
<RegExpr String="(verbatim|boxedverbatim)" attribute="Environment" context="VerbatimEnv"/>
<RegExpr String="comment" attribute="Environment" context="CommentEnv"/>
<RegExpr String="(alignat|xalignat|xxalignat)" attribute="Environment" context="MathEnvParam"/>
<RegExpr String="(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|flalign|IEEEeqnarray|IEEEeqnarraybox|smallmatrix|pmatrix|bmatrix|Bmatrix|vmatrix|Vmatrix|cases)" attribute="Environment" context="MathEnv"/>
<RegExpr String="(tabularx|tabular|supertabular|mpsupertabular|xtabular|mpxtabular|longtable)" attribute="Environment" context="TabEnv"/>
<DetectChar char="&#xd7;" attribute="Bullet" context="#stay"/>