annotate runtime/syntax/tex.vim @ 1366:7e7da11555d2 v7.1.080

updated for version 7.1-080
author vimboss
date Sat, 18 Aug 2007 15:00:42 +0000
parents e63691e7c504
children 73fe8baea242
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: TeX
477
f8b75b8f1988 updated for version 7.0128
vimboss
parents: 190
diff changeset
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
4 " Last Change: Feb 27, 2007
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
5 " Version: 37
477
f8b75b8f1988 updated for version 7.0128
vimboss
parents: 190
diff changeset
6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Notes: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " use %stopzone.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " by suitable use of %stopzone.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " 3. If you have a slow computer, you may wish to modify
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " syn sync maxlines=200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " to values that are more to your liking.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " 4. There is no match-syncing for $...$ and $$...$$; hence large
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 " equation blocks constructed that way may exhibit syncing problems.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " (there's no difference between begin/end patterns)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " 5. If you have the variable "g:tex_no_error" defined then none of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " lexical error-checking will be done.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " ie. let g:tex_no_error=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Version Clears: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Define the default highlighting. {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if version >= 508 || !exists("did_tex_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 let did_tex_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 if exists("g:tex_tex") && !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 let g:tex_no_error= 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
190
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
56 " Determine whether or not to use "*.sty" mode {{{1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " The user may override the normal determination by setting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " g:tex_stylish to 1 (for "*.sty" mode)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " or to 0 else (normal "*.tex" mode)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " or on a buffer-by-buffer basis with b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 let b:extfname=expand("%:e")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if exists("g:tex_stylish")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let b:tex_stylish= g:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 elseif !exists("b:tex_stylish")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 if b:extfname == "sty" || b:extfname == "cls" || b:extfname == "clo" || b:extfname == "dtx" || b:extfname == "ltx"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let b:tex_stylish= 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 let b:tex_stylish= 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
190
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
72 " handle folding {{{1
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
73 if !exists("g:tex_fold_enabled")
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
74 let g:tex_fold_enabled= 0
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
75 elseif g:tex_fold_enabled && !has("folding")
527
93a822c9e3d2 updated for version 7.0147
vimboss
parents: 482
diff changeset
76 let g:tex_fold_enabled= 0
190
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
77 echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support"
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
78 endif
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
79 if g:tex_fold_enabled && &fdm == "manual"
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
80 set fdm=syntax
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
81 endif
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
82
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " (La)TeX keywords: only use the letters a-zA-Z {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " but _ is the only one that causes problems.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 set isk-=_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 set isk+=@
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 setlocal isk-=_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 setlocal isk+=@
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " Clusters: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " --------
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSectionMarker,texSectionName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn cluster texCmdGroup add=texMathError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
477
f8b75b8f1988 updated for version 7.0128
vimboss
parents: 190
diff changeset
104 syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texSectionMarker,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
105 syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
106 syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn cluster texMatchGroup add=@texMathZones
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn cluster texMathMatchGroup add=texMathError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn cluster texMathZoneGroup add=texMathError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 endif
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
117 syn cluster texMathZoneGroup add=@NoSpell
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
118 " following used in the \part \chapter \section \subsection \subsubsection
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
119 " \paragraph \subparagraph \author \title highlighting
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
120 syn cluster texDocGroup contains=texPartZone,@texPartGroup
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
121 syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
122 syn cluster texChapterGroup contains=texSectionZone,texParaZone
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
123 syn cluster texSectionGroup contains=texSubSectionZone,texParaZone
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
124 syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
125 syn cluster texSubSubSectionGroup contains=texParaZone
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
126 syn cluster texParaGroup contains=texSubParaZone
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 " Try to flag {} and () mismatches: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 endif
36
125e80798a85 updated for version 7.0021
vimboss
parents: 12
diff changeset
137 syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn match texError "[}\])]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn match texMathError "}" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 " TeX/LaTeX keywords: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 " Instead of trying to be All Knowing, I just match \..alphameric..
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 " Note that *.tex files may not have "@" in their \commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 if exists("g:tex_tex") || b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match texStatement "\\[a-zA-Z@]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn match texStatement "\\\a\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn match texError "\\\a*@[a-zA-Z@]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 " TeX/LaTeX delimiters: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn match texDelimiter "&"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn match texDelimiter "\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 " Tex/Latex Options: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn match texOption "[^\\]\zs#\d\+\|^#\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 " texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn match texAccent "\\[bcdvuH]\A"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)\A"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn match texAccent "\\[bcdvuH]$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn match texAccent +\\[=^.\~"`']+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 " \begin{}/\end{} section markers: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn match texSectionMarker "\\begin\>\|\\end\>" nextgroup=texSectionName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn region texSectionName matchgroup=Delimiter start="{" end="}" contained nextgroup=texSectionModifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn region texSectionModifier matchgroup=Delimiter start="\[" end="]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 " \documentclass, \documentstyle, \usepackage: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texSectionName,texDocTypeArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texSectionName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
760
08360213aa1d updated for version 7.0224
vimboss
parents: 699
diff changeset
189 " Preamble syntax-based folding support: {{{1
08360213aa1d updated for version 7.0224
vimboss
parents: 699
diff changeset
190 if g:tex_fold_enabled && has("folding")
08360213aa1d updated for version 7.0224
vimboss
parents: 699
diff changeset
191 syn region texPreamble transparent fold start='\zs\\documentclass\>' end='\ze\\begin{document}' contains=@texMatchGroup
08360213aa1d updated for version 7.0224
vimboss
parents: 699
diff changeset
192 endif
08360213aa1d updated for version 7.0224
vimboss
parents: 699
diff changeset
193
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 " TeX input: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 syn match texInputCurlies "[{}]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 " Type Styles (LaTeX 2.09): {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 syn match texTypeStyle "\\rm\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 syn match texTypeStyle "\\em\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 syn match texTypeStyle "\\bf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 syn match texTypeStyle "\\it\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 syn match texTypeStyle "\\sl\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 syn match texTypeStyle "\\sf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 syn match texTypeStyle "\\sc\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 syn match texTypeStyle "\\tt\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 " Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 syn match texTypeStyle "\\textbf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 syn match texTypeStyle "\\textit\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 syn match texTypeStyle "\\textmd\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 syn match texTypeStyle "\\textrm\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 syn match texTypeStyle "\\textsc\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 syn match texTypeStyle "\\textsf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 syn match texTypeStyle "\\textsl\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 syn match texTypeStyle "\\texttt\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 syn match texTypeStyle "\\textup\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 syn match texTypeStyle "\\emph\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 syn match texTypeStyle "\\mathbb\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 syn match texTypeStyle "\\mathbf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 syn match texTypeStyle "\\mathcal\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 syn match texTypeStyle "\\mathfrak\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 syn match texTypeStyle "\\mathit\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 syn match texTypeStyle "\\mathnormal\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 syn match texTypeStyle "\\mathrm\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 syn match texTypeStyle "\\mathsf\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 syn match texTypeStyle "\\mathtt\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 syn match texTypeStyle "\\rmfamily\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 syn match texTypeStyle "\\sffamily\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 syn match texTypeStyle "\\ttfamily\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 syn match texTypeStyle "\\itshape\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 syn match texTypeStyle "\\scshape\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 syn match texTypeStyle "\\slshape\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 syn match texTypeStyle "\\upshape\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 syn match texTypeStyle "\\bfseries\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 syn match texTypeStyle "\\mdseries\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 " Some type sizes: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 syn match texTypeSize "\\tiny\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 syn match texTypeSize "\\scriptsize\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 syn match texTypeSize "\\footnotesize\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 syn match texTypeSize "\\small\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 syn match texTypeSize "\\normalsize\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 syn match texTypeSize "\\large\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 syn match texTypeSize "\\Large\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 syn match texTypeSize "\\LARGE\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 syn match texTypeSize "\\huge\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 syn match texTypeSize "\\Huge\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 " Spacecodes (TeX'isms): {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 " \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 " Sections, subsections, etc: {{{1
190
a1f18bd133d6 updated for version 7.0057
vimboss
parents: 36
diff changeset
263 if g:tex_fold_enabled && has("folding")
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
264 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
265 syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' fold contains=@texFoldGroup,@texPartGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
266 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' fold contains=@texFoldGroup,@texChapterGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
267 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' fold contains=@texFoldGroup,@texSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
268 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
269 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
270 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' fold contains=@texFoldGroup,@texParaGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
271 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' fold contains=@texFoldGroup,@Spell
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
272 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
273 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell
36
125e80798a85 updated for version 7.0021
vimboss
parents: 12
diff changeset
274 else
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
275 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
276 syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' contains=@texFoldGroup,@texPartGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
277 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' contains=@texFoldGroup,@texChapterGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
278 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' contains=@texFoldGroup,@texSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
279 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' contains=@texFoldGroup,@texSubSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
280 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
281 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' contains=@texFoldGroup,@texParaGroup,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
282 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' contains=@texFoldGroup,@Spell
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
283 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
284 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
36
125e80798a85 updated for version 7.0021
vimboss
parents: 12
diff changeset
285 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 " Bad Math (mismatched): {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 syn match texBadMath "\\[\])]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 " Math Zones: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 if !exists("tex_no_math")
477
f8b75b8f1988 updated for version 7.0128
vimboss
parents: 190
diff changeset
296 " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 " Starred forms are created if starform is true. Starred
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 " forms have syntax group and synchronization groups with a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 " "S" appended. Handles: cluster, syntax, sync, and HiLink.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 fun! TexNewMathZone(sfx,mathzone,starform)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 let grpname = "texMathZone".a:sfx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 let syncname = "texSyncMathZone".a:sfx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 exe "syn cluster texMathZones add=".grpname
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 exe 'HiLink '.grpname.' texMath'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 if a:starform
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 let grpname = "texMathZone".a:sfx.'S'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 let syncname = "texSyncMathZone".a:sfx.'S'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 exe "syn cluster texMathZones add=".grpname
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 exe 'HiLink '.grpname.' texMath'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 " Standard Math Zones: {{{2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 call TexNewMathZone("A","align",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 call TexNewMathZone("B","alignat",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 call TexNewMathZone("C","displaymath",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 call TexNewMathZone("D","eqnarray",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 call TexNewMathZone("E","equation",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 call TexNewMathZone("F","flalign",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 call TexNewMathZone("G","gather",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 call TexNewMathZone("H","math",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 call TexNewMathZone("I","multline",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 call TexNewMathZone("J","subequations",0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 call TexNewMathZone("K","xalignat",1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 call TexNewMathZone("L","xxalignat",0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 " Inline Math Zones: {{{2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 syn match texMathOper "[_^=]" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 " \left..something.. and \right..something.. support: {{{2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 syn match texMathDelimBad contained "\S"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 syn match texMathDelim contained "\\\(left\|right\|[bB]igg\=[lr]\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 syn match texMathDelim contained "\\lefteqn\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348 syn match texMathDelimSet1 contained "[<>()[\]|/.]\|\\[{}|]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 syn keyword texMathDelimKey contained backslash lceil lVert rgroup uparrow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 syn keyword texMathDelimKey contained downarrow lfloor rangle rmoustache Uparrow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 syn keyword texMathDelimKey contained Downarrow lgroup rbrace rvert updownarrow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 syn keyword texMathDelimKey contained langle lmoustache rceil rVert Updownarrow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 syn keyword texMathDelimKey contained lbrace lvert rfloor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 " Special TeX characters ( \$ \& \% \# \{ \} \_ \S \P ) : {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 syn match texSpecialChar "\\[$&%#{}_]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 syn match texSpecialChar "\\[SP@][^a-zA-Z@]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 syn match texSpecialChar "\\[SP@]\A"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 syn match texSpecialChar "\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 syn match texOnlyMath "[_^]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 " Comments: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 " Normal TeX LaTeX : %....
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 " Documented TeX Format: ^^A... -and- leading %s (only)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 syn cluster texCommentGroup contains=texTodo,@Spell
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 syn case ignore
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 760
diff changeset
374 syn keyword texTodo contained combak fixme todo xxx
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 if b:extfname == "dtx"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 syn match texComment "\^\^A.*$" contains=@texCommentGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 syn match texComment "^%\+" contains=@texCommentGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 else
699
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
380 if g:tex_fold_enabled
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
381 " allows syntax-folding of 2 or more contiguous comment lines
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
382 " single-line comments are not folded
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
383 syn match texComment "%.*$" contains=@texCommentGroup
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
384 syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
385 else
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
386 syn match texComment "%.*$" contains=@texCommentGroup
2af8de31a3a8 updated for version 7.0211
vimboss
parents: 587
diff changeset
387 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 " Separate lines used for verb` and verb# so that the end conditions {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 " will appropriately terminate. Ideally vim would let me save a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 " character from the start pattern and re-use it in the end-pattern.
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 477
diff changeset
393 syn region texZone start="\\begin{verbatim}" end="\\end{verbatim}\|%stopzone\>" contains=@Spell
836
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
394 " listings package:
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
395 syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
396 " moreverb package:
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
397 syn region texZone start="\\begin{verbatimtab}" end="\\end{verbatimtab}\|%stopzone\>" contains=@Spell
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
398 syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" contains=@Spell
5a7843c57316 updated for version 7.0e02
vimboss
parents: 827
diff changeset
399 syn region texZone start="\\begin{boxedverbatim}" end="\\end{boxedverbatim}\|%stopzone\>" contains=@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 " Tex Reference Zones: {{{1
12
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
412 syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
413 syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
414 syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
415 syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
416 syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup
bdeee1504ac1 updated for version 7.0004
vimboss
parents: 7
diff changeset
417 syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup
587
3686831cf3da updated for version 7.0166
vimboss
parents: 527
diff changeset
418 syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
3686831cf3da updated for version 7.0166
vimboss
parents: 527
diff changeset
419 syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup nextgroup=texRefOption,texCite
3686831cf3da updated for version 7.0166
vimboss
parents: 527
diff changeset
420 syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 " Handle newcommand, newenvironment : {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 " Definitions/Commands: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 if b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 syn match texDefName contained "\\[a-zA-Z@]\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 syn match texDefName contained "\\[^a-zA-Z@]" nextgroup=texDefParms,texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 syn match texDefName contained "\\\a\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 syn match texDefName contained "\\\A" nextgroup=texDefParms,texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdBody skipwhite skipnl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 syn match texDefParm contained "#\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 " TeX Lengths: {{{1
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 836
diff changeset
445 syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 " TeX String Delimiters: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 syn match texString "\(``\|''\|,,\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 " LaTeX synchronization: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 syn sync maxlines=200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 syn sync match texSyncStop groupthere NONE "%stopzone\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 " Synchronization: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 " The $..$ and $$..$$ make for impossible sync patterns
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 " (one can't tell if a "$$" starts or stops a math zone by itself)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 " The following grouptheres coupled with minlines above
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 " help improve the odds of good syncing.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 syn sync match texSyncMathZoneA groupthere NONE "\\end{center}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 syn sync match texSyncMathZoneA groupthere NONE "\\end{description}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 syn sync match texSyncMathZoneA groupthere NONE "\\end{enumerate}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 syn sync match texSyncMathZoneA groupthere NONE "\\end{itemize}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 syn sync match texSyncMathZoneA groupthere NONE "\\end{table}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 syn sync match texSyncMathZoneA groupthere NONE "\\end{tabular}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 " Highlighting: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 if did_tex_syntax_inits == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 let did_tex_syntax_inits= 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 " TeX highlighting groups which should share similar highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 if !exists("g:tex_no_error")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 HiLink texBadMath texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 HiLink texMathDelimBad texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 HiLink texMathError texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 if !b:tex_stylish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 HiLink texOnlyMath texError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 HiLink texError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487
587
3686831cf3da updated for version 7.0166
vimboss
parents: 527
diff changeset
488 HiLink texCite texRefZone
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 HiLink texDefCmd texDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 HiLink texDefName texDef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 HiLink texDocType texCmdName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 HiLink texDocTypeArgs texCmdArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 HiLink texInputFileOpt texCmdArgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 HiLink texInputCurlies texDelimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 HiLink texLigature texSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 if !exists("tex_no_math")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 HiLink texMathDelimSet1 texMathDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 HiLink texMathDelimSet2 texMathDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 HiLink texMathDelimKey texMathDelim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 HiLink texMathMatcher texMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 HiLink texMathZoneW texMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 HiLink texMathZoneX texMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 HiLink texMathZoneY texMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 HiLink texMathZoneZ texMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 HiLink texSectionMarker texCmdName
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 HiLink texSectionName texSection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 HiLink texSpaceCode texStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 HiLink texTypeSize texType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510 HiLink texTypeStyle texType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 " Basic TeX highlighting groups
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513 HiLink texCmdArgs Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 HiLink texCmdName Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 HiLink texComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 HiLink texDef Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 HiLink texDefParm Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 HiLink texDelimiter Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 HiLink texInput Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 HiLink texInputFile Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 HiLink texLength Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 HiLink texMath Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523 HiLink texMathDelim Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 HiLink texMathOper Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 HiLink texNewCmd Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526 HiLink texNewEnv Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 HiLink texOption Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528 HiLink texRefZone Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529 HiLink texSection PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 HiLink texSpaceCodeChar Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531 HiLink texSpecialChar SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532 HiLink texStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 HiLink texString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534 HiLink texTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535 HiLink texType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536 HiLink texZone PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 " Current Syntax: {{{1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542 unlet b:extfname
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543 let b:current_syntax = "tex"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544 " vim: ts=8 fdm=marker