Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/latex.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY bullet "×"> | 4 | <!ENTITY bullet "×"> | ||
5 | <!ENTITY envname "[a-zA-Z]+\*?"> | 5 | <!ENTITY envname "[a-zA-Z]+\*?"> | ||
6 | <!ENTITY regionmarker "%\s*(?:BEGIN|END)"> | 6 | <!ENTITY regionmarker "%\s*(?:BEGIN|END)"> | ||
7 | ]> | 7 | ]> | ||
8 | <language name="LaTeX" version="12" 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" > | 8 | <language name="LaTeX" version="13" 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" > | ||
9 | <highlighting> | 9 | <highlighting> | ||
10 | <!-- NOTE: Keywords of kind "\something" do not need a delimiter before "\". | 10 | <!-- NOTE: Keywords of kind "\something" do not need a delimiter before "\". | ||
11 | Using a DetectChar rule with lookAhead to detect "\" at the beginning | 11 | Using a DetectChar rule with lookAhead to detect "\" at the beginning | ||
12 | avoids the requirement of the delimiter in the keyword. --> | 12 | avoids the requirement of the delimiter in the keyword. --> | ||
13 | <list name="beginEnv"> | 13 | <list name="beginEnv"> | ||
14 | <item>\begin</item> | 14 | <item>\begin</item> | ||
15 | </list> | 15 | </list> | ||
16 | 16 | | |||
▲ Show 20 Lines • Show All 415 Lines • ▼ Show 20 Line(s) | 279 | <contexts> | |||
432 | <context name="Label" attribute="Normal Text" lineEndContext="#stay"> | 432 | <context name="Label" attribute="Normal Text" lineEndContext="#stay"> | ||
433 | <DetectSpaces/> | 433 | <DetectSpaces/> | ||
434 | <DetectChar char="{" attribute="Normal Text" context="LabelParameter"/> | 434 | <DetectChar char="{" attribute="Normal Text" context="LabelParameter"/> | ||
435 | <DetectChar char="[" attribute="Normal Text" context="LabelOption"/> | 435 | <DetectChar char="[" attribute="Normal Text" context="LabelOption"/> | ||
436 | </context> | 436 | </context> | ||
437 | 437 | | |||
438 | <context name="LabelOption" attribute="Normal Text" lineEndContext="#stay"> | 438 | <context name="LabelOption" attribute="Normal Text" lineEndContext="#stay"> | ||
439 | <DetectSpaces/> | 439 | <DetectSpaces/> | ||
440 | <DetectChar char="(" attribute="Math" context="MathModeTex" /> | 440 | <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex"/> | ||
441 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | 441 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | ||
442 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | 442 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | ||
443 | <DetectChar char="%" attribute="Comment" context="Comment"/> | 443 | <DetectChar char="%" attribute="Comment" context="Comment"/> | ||
444 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | 444 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | ||
445 | <DetectChar char="]" attribute="Normal Text" context="#pop"/> | 445 | <DetectChar char="]" attribute="Normal Text" context="#pop"/> | ||
446 | </context> | 446 | </context> | ||
447 | 447 | | |||
448 | <context name="LabelParameter" attribute="Reference" lineEndContext="#stay"> | 448 | <context name="LabelParameter" attribute="Reference" lineEndContext="#stay"> | ||
449 | <DetectSpaces/> | 449 | <DetectSpaces/> | ||
450 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | 450 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | ||
451 | <DetectChar char="}" attribute="Normal Text" context="#pop#pop"/> | 451 | <DetectChar char="}" attribute="Normal Text" context="#pop#pop"/> | ||
452 | </context> | 452 | </context> | ||
453 | 453 | | |||
454 | <!-- labels from biblatex commands --> | 454 | <!-- labels from biblatex commands --> | ||
455 | <context name="FancyLabel" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 455 | <context name="FancyLabel" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
456 | <DetectSpaces/> | 456 | <DetectSpaces/> | ||
457 | <DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/> | 457 | <DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/> | ||
458 | <DetectChar char="[" attribute="Normal Text" context="FancyLabelOption"/> | 458 | <DetectChar char="[" attribute="Normal Text" context="FancyLabelOption"/> | ||
459 | <DetectChar char="(" attribute="Normal Text" context="FancyLabelRoundBrackets"/> | 459 | <DetectChar char="(" attribute="Normal Text" context="FancyLabelRoundBrackets"/> | ||
460 | </context> | 460 | </context> | ||
461 | 461 | | |||
462 | <context name="FancyLabelParameter" attribute="Environment" lineEndContext="#stay"> | 462 | <context name="FancyLabelParameter" attribute="Environment" lineEndContext="#stay"> | ||
463 | <DetectSpaces/> | 463 | <DetectSpaces/> | ||
464 | <DetectChar char="(" attribute="Math" context="MathModeTex" /> | 464 | <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex"/> | ||
465 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | 465 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | ||
466 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | 466 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | ||
467 | <DetectChar char="%" attribute="Comment" context="Comment"/> | 467 | <DetectChar char="%" attribute="Comment" context="Comment"/> | ||
468 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | 468 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | ||
469 | <DetectChar char="}" attribute="Normal Text" context="#pop"/> | 469 | <DetectChar char="}" attribute="Normal Text" context="#pop"/> | ||
470 | <DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/> | 470 | <DetectChar char="{" attribute="Normal Text" context="FancyLabelParameter"/> | ||
471 | </context> | 471 | </context> | ||
472 | 472 | | |||
Show All 14 Lines | |||||
487 | <!-- Special commands --> | 487 | <!-- Special commands --> | ||
488 | <context name="SpecialCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | 488 | <context name="SpecialCommand" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop"> | ||
489 | <DetectSpaces/> | 489 | <DetectSpaces/> | ||
490 | <DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/> | 490 | <DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/> | ||
491 | </context> | 491 | </context> | ||
492 | 492 | | |||
493 | <context name="SpecialCommandParameterOption" attribute="Option Text" lineEndContext="#stay"> | 493 | <context name="SpecialCommandParameterOption" attribute="Option Text" lineEndContext="#stay"> | ||
494 | <DetectSpaces/> | 494 | <DetectSpaces/> | ||
495 | <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeTex" /> | 495 | <Detect2Chars char="\" char1="(" attribute="Math" context="MathModeLatex" /> | ||
496 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | 496 | <DetectChar char="\" attribute="Macro" context="ContrSeq"/> | ||
497 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | 497 | <DetectChar char="$" attribute="Math" context="MathModeTex" /> | ||
498 | <DetectChar char="%" attribute="Comment" context="Comment"/> | 498 | <DetectChar char="%" attribute="Comment" context="Comment"/> | ||
499 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | 499 | <DetectChar char="•" attribute="Bullet" context="#stay"/> | ||
500 | <DetectChar char="}" attribute="Normal Text" context="#pop"/> | 500 | <DetectChar char="}" attribute="Normal Text" context="#pop"/> | ||
501 | <DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/> | 501 | <DetectChar char="{" attribute="Normal Text" context="SpecialCommandParameterOption"/> | ||
502 | </context> | 502 | </context> | ||
503 | 503 | | |||
▲ Show 20 Lines • Show All 628 Lines • Show Last 20 Lines |