Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
63e939b3
Commit
63e939b3
authored
Aug 12, 2013
by
Dominik Haumann
Browse files
fix LaTeX highlighting error for \lstinline[]{...}
Thanks to Michael for the patch! FIXED-IN: 4.11.1
BUG: 322154
parent
e78704d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
part/syntax/data/latex.xml
View file @
63e939b3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language
name=
"LaTeX"
version=
"1.5
4
"
section=
"Markup"
kateversion=
"2.3"
priority=
"10"
extensions=
"*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz"
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"
>
<language
name=
"LaTeX"
version=
"1.5
5
"
section=
"Markup"
kateversion=
"2.3"
priority=
"10"
extensions=
"*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz"
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>
<contexts>
<!-- Normal text -->
...
...
@@ -126,7 +126,8 @@
<!-- LaTeX command in text mode -->
<context
name=
"ContrSeq"
attribute=
"Keyword"
lineEndContext=
"#pop"
>
<StringDetect
String=
"verb*"
attribute=
"Keyword"
context=
"Verb"
/>
<RegExpr
String=
"(Verb|verb|lstinline)(?=[^a-zA-Z])"
attribute=
"Keyword"
context=
"Verb"
/>
<RegExpr
String=
"(Verb|verb)(?=[^a-zA-Z])"
attribute=
"Keyword"
context=
"Verb"
/>
<RegExpr
String=
"(lstinline)(?=[^a-zA-Z])"
attribute=
"Keyword"
context=
"Lstinline"
/>
<RegExpr
String=
"mint(?=[^a-zA-Z])"
attribute=
"Keyword"
context=
"MintParam"
/>
<DetectChar
char=
"×"
attribute=
"Bullet"
context=
"#stay"
/>
<RegExpr
String=
"[a-zA-Z@]+(\+?|\*{0,3})"
attribute=
"Keyword"
context=
"#pop"
/>
...
...
@@ -152,6 +153,21 @@
<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"
/>
<RegExpr
String=
"(.)"
attribute=
"Normal Text"
dynamic=
"true"
context=
"LstinlineEnd"
/>
</context>
<context
name=
"LstinlineEnd"
attribute=
"Verbatim"
lineEndContext=
"#pop#pop#pop"
dynamic=
"true"
>
<StringDetect
String=
"%1"
attribute=
"Normal Text"
context=
"#pop#pop#pop"
dynamic=
"true"
/>
<DetectChar
char=
"×"
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"
/>
</context>
<!-- label -->
<context
name=
"Label"
attribute=
"Normal Text"
lineEndContext=
"#stay"
>
<RegExpr
String=
"\s*\{\s*"
attribute=
"Normal Text"
context=
"LabelParameter"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment