comparison runtime/syntax/tex.vim @ 3099:887d6d91882e

Updated a few runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 21 Sep 2011 19:22:10 +0200
parents b0d34143ebfc
children 37ecb8ff4560
comparison
equal deleted inserted replaced
3098:cabd149477b2 3099:887d6d91882e
1 " Vim syntax file 1 " Vim syntax file
2 " Language: TeX 2 " Language: TeX
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM> 3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
4 " Last Change: Dec 07, 2010 4 " Last Change: Aug 22, 2011
5 " Version: 64 5 " Version: 68
6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax 6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
7 " 7 "
8 " Notes: {{{1 8 " Notes: {{{1
9 " 9 "
10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries, 10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries,
99 setlocal isk=48-57,a-z,A-Z,192-255 99 setlocal isk=48-57,a-z,A-Z,192-255
100 endif 100 endif
101 if b:tex_stylish 101 if b:tex_stylish
102 setlocal isk+=@-@ 102 setlocal isk+=@-@
103 endif 103 endif
104 if exists("g:tex_nospell") && g:tex_nospell && !exists("g:tex_comment_nospell")
105 let g:tex_comment_nospell= 1
106 endif
104 107
105 " Clusters: {{{1 108 " Clusters: {{{1
106 " -------- 109 " --------
107 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 110 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
108 if !exists("g:tex_no_error") 111 if !exists("g:tex_no_error")
109 syn cluster texCmdGroup add=texMathError 112 syn cluster texCmdGroup add=texMathError
110 endif 113 endif
111 syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement 114 syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
112 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 115 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
113 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 116 if !exists("g:tex_nospell") || !g:tex_nospell
114 syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher 117 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
118 syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
119 else
120 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
121 syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
122 endif
115 syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter 123 syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
116 if !exists("tex_no_math") 124 if !exists("tex_no_math")
117 syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ 125 syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
118 syn cluster texMatchGroup add=@texMathZones 126 syn cluster texMatchGroup add=@texMathZones
119 syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 127 syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
145 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError 153 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError
146 else 154 else
147 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup 155 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup
148 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup 156 syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup
149 endif 157 endif
150 syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell 158 if !exists("g:tex_nospell") || !g:tex_nospell
159 syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
160 else
161 syn region texParen start="(" end=")" contains=@texMatchGroup
162 endif
151 if !exists("g:tex_no_error") 163 if !exists("g:tex_no_error")
152 syn match texError "[}\])]" 164 syn match texError "[}\])]"
153 endif 165 endif
154 if !exists("tex_no_math") 166 if !exists("tex_no_math")
155 if !exists("g:tex_no_error") 167 if !exists("g:tex_no_error")
156 syn match texMathError "}" contained 168 syn match texMathError "}" contained
157 endif 169 endif
158 syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup 170 syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
171 " syn region texMathMatcher matchgroup=Unique start="[^\\]\zs{" skip="\\\\\|\\[{}]" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
159 endif 172 endif
160 173
161 " TeX/LaTeX keywords: {{{1 174 " TeX/LaTeX keywords: {{{1
162 " Instead of trying to be All Knowing, I just match \..alphameric.. 175 " Instead of trying to be All Knowing, I just match \..alphameric..
163 " Note that *.tex files may not have "@" in their \commands 176 " Note that *.tex files may not have "@" in their \commands
171 endif 184 endif
172 185
173 " TeX/LaTeX delimiters: {{{1 186 " TeX/LaTeX delimiters: {{{1
174 syn match texDelimiter "&" 187 syn match texDelimiter "&"
175 syn match texDelimiter "\\\\" 188 syn match texDelimiter "\\\\"
189 syn match texDelimiter "[{}]"
176 190
177 " Tex/Latex Options: {{{1 191 " Tex/Latex Options: {{{1
178 syn match texOption "[^\\]\zs#\d\+\|^#\d\+" 192 syn match texOption "[^\\]\zs#\d\+\|^#\d\+"
179 193
180 " texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1 194 " texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1
271 " \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x 285 " \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x
272 syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar 286 syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar
273 syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained 287 syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
274 288
275 " Sections, subsections, etc: {{{1 289 " Sections, subsections, etc: {{{1
276 if g:tex_fold_enabled && has("folding") 290 if !exists("g:tex_nospell") || !g:tex_nospell
277 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell 291 if g:tex_fold_enabled && has("folding")
278 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell 292 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
279 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell 293 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell
280 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell 294 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell
281 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell 295 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell
282 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell 296 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
283 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell 297 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
284 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell 298 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell
285 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell 299 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell
286 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell 300 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell
301 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell
302 else
303 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
304 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
305 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
306 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
307 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
308 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
309 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
310 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
311 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
312 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
313 endif
287 else 314 else
288 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell 315 if g:tex_fold_enabled && has("folding")
289 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell 316 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup
290 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell 317 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup
291 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell 318 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup
292 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell 319 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup
293 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell 320 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup
294 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell 321 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup
295 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell 322 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup
296 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell 323 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup
297 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell 324 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup
325 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup
326 else
327 syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
328 syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup
329 syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup
330 syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup
331 syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
332 syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup
333 syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup
334 syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup
335 syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup
336 syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup
337 endif
298 endif 338 endif
299 339
300 " Bad Math (mismatched): {{{1 340 " Bad Math (mismatched): {{{1
301 if !exists("tex_no_math") 341 if !exists("tex_no_math")
302 syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}" 342 syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
303 syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" 343 syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
304 syn match texBadMath "\\[\])]" 344 syn match texBadMath "\\[\])]"
305 endif 345 endif
306 346
307 " Math Zones: {{{1 347 " Math Zones: {{{1
342 call TexNewMathZone("E","equation",1) 382 call TexNewMathZone("E","equation",1)
343 call TexNewMathZone("F","flalign",1) 383 call TexNewMathZone("F","flalign",1)
344 call TexNewMathZone("G","gather",1) 384 call TexNewMathZone("G","gather",1)
345 call TexNewMathZone("H","math",1) 385 call TexNewMathZone("H","math",1)
346 call TexNewMathZone("I","multline",1) 386 call TexNewMathZone("I","multline",1)
387 call TexNewMathZone("J","subequations",0)
347 call TexNewMathZone("K","xalignat",1) 388 call TexNewMathZone("K","xalignat",1)
348 call TexNewMathZone("L","xxalignat",0) 389 call TexNewMathZone("L","xxalignat",0)
349 390
350 " Inline Math Zones: {{{2 391 " Inline Math Zones: {{{2
351 if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd' 392 if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd'
362 syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup 403 syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
363 404
364 syn match texMathOper "[_^=]" contained 405 syn match texMathOper "[_^=]" contained
365 406
366 " Text Inside Math Zones: {{{2 407 " Text Inside Math Zones: {{{2
367 syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell 408 if !exists("g:tex_nospell") || !g:tex_nospell
409 syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell
410 else
411 syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup
412 endif
368 413
369 " \left..something.. and \right..something.. support: {{{2 414 " \left..something.. and \right..something.. support: {{{2
370 syn match texMathDelimBad contained "\S" 415 syn match texMathDelimBad contained "\S"
371 if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm' 416 if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm'
372 syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ 417 syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
499 endif 544 endif
500 endif 545 endif
501 endif 546 endif
502 547
503 " Tex Reference Zones: {{{1 548 " Tex Reference Zones: {{{1
504 syn match texRefZone '\\@samp\>' skipwhite nextgroup=texRefLabel 549 syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
505 syn match texRefZone '\\nocite\>' skipwhite nextgroup=texRefLabel 550 syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
506 syn match texRefZone '\\bibliography\>' skipwhite nextgroup=texRefLabel 551 syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
507 syn match texRefZone '\\label\>' skipwhite nextgroup=texRefLabel 552 syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup
508 syn match texRefZone '\\\(page\|eq\)ref\>' skipwhite nextgroup=texRefLabel 553 syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup
509 syn match texRefZone '\\v\=ref' skipwhite nextgroup=texRefLabel 554 syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup
510 syn match texRefZone '\\cite\%([tp]\*\=\)\=' skipwhite nextgroup=texCiteOption,texCite 555 syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
511 syn region texRefLabel contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup 556 syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
512 syn region texCiteOption contained matchgroup=Delimiter start='\[' end=']' contains=@Spell,@texRefGroup,@texMathZones,texRefZone nextgroup=texCiteOption,texCite 557 syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
513 syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texCite
514 558
515 " Handle newcommand, newenvironment : {{{1 559 " Handle newcommand, newenvironment : {{{1
516 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl 560 syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
517 syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl 561 syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
518 syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl 562 syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
554 " Math Symbols {{{2 598 " Math Symbols {{{2
555 " (many of these symbols were contributed by Björn Winckler) 599 " (many of these symbols were contributed by Björn Winckler)
556 if s:tex_conceal =~ 'm' 600 if s:tex_conceal =~ 'm'
557 let s:texMathList=[ 601 let s:texMathList=[
558 \ ['|' , '‖'], 602 \ ['|' , '‖'],
603 \ ['aleph' , 'ℵ'],
559 \ ['angle' , '∠'], 604 \ ['angle' , '∠'],
560 \ ['approx' , '≈'], 605 \ ['approx' , '≈'],
561 \ ['ast' , '∗'], 606 \ ['ast' , '∗'],
562 \ ['asymp' , '≍'], 607 \ ['asymp' , '≍'],
563 \ ['backepsilon' , '∍'], 608 \ ['backepsilon' , '∍'],
564 \ ['backsimeq' , '≃'], 609 \ ['backsimeq' , '≃'],
610 \ ['backslash' , '∖'],
565 \ ['barwedge' , '⊼'], 611 \ ['barwedge' , '⊼'],
566 \ ['because' , '∵'], 612 \ ['because' , '∵'],
567 \ ['between' , '≬'], 613 \ ['between' , '≬'],
568 \ ['bigcap' , '∩'], 614 \ ['bigcap' , '∩'],
569 \ ['bigcup' , '∪'], 615 \ ['bigcup' , '∪'],
590 \ ['circeq' , '≗'], 636 \ ['circeq' , '≗'],
591 \ ['circlearrowleft', '↺'], 637 \ ['circlearrowleft', '↺'],
592 \ ['circlearrowright', '↻'], 638 \ ['circlearrowright', '↻'],
593 \ ['circledast' , '⊛'], 639 \ ['circledast' , '⊛'],
594 \ ['circledcirc' , '⊚'], 640 \ ['circledcirc' , '⊚'],
641 \ ['clubsuit' , '♣'],
595 \ ['complement' , '∁'], 642 \ ['complement' , '∁'],
596 \ ['cong' , '≅'], 643 \ ['cong' , '≅'],
597 \ ['coprod' , '∐'], 644 \ ['coprod' , '∐'],
645 \ ['copyright' , '©'],
598 \ ['cup' , '∪'], 646 \ ['cup' , '∪'],
599 \ ['Cup' , '⋓'], 647 \ ['Cup' , '⋓'],
600 \ ['curlyeqprec' , '⋞'], 648 \ ['curlyeqprec' , '⋞'],
601 \ ['curlyeqsucc' , '⋟'], 649 \ ['curlyeqsucc' , '⋟'],
602 \ ['curlyvee' , '⋎'], 650 \ ['curlyvee' , '⋎'],
603 \ ['curlywedge' , '⋏'], 651 \ ['curlywedge' , '⋏'],
604 \ ['dashv' , '⊣'], 652 \ ['dashv' , '⊣'],
605 \ ['diamond' , '⋄'], 653 \ ['diamond' , '⋄'],
654 \ ['diamondsuit' , '♢'],
606 \ ['div' , '÷'], 655 \ ['div' , '÷'],
607 \ ['doteq' , '≐'], 656 \ ['doteq' , '≐'],
608 \ ['doteqdot' , '≑'], 657 \ ['doteqdot' , '≑'],
609 \ ['dotplus' , '∔'], 658 \ ['dotplus' , '∔'],
610 \ ['dotsb' , '⋯'], 659 \ ['dotsb' , '⋯'],
619 \ ['eqcirc' , '≖'], 668 \ ['eqcirc' , '≖'],
620 \ ['eqsim' , '≂'], 669 \ ['eqsim' , '≂'],
621 \ ['eqslantgtr' , '⪖'], 670 \ ['eqslantgtr' , '⪖'],
622 \ ['eqslantless' , '⪕'], 671 \ ['eqslantless' , '⪕'],
623 \ ['equiv' , '≡'], 672 \ ['equiv' , '≡'],
673 \ ['ell' , 'ℓ'],
624 \ ['exists' , '∃'], 674 \ ['exists' , '∃'],
625 \ ['fallingdotseq' , '≒'], 675 \ ['fallingdotseq' , '≒'],
676 \ ['flat' , '♭'],
626 \ ['forall' , '∀'], 677 \ ['forall' , '∀'],
627 \ ['ge' , '≥'], 678 \ ['ge' , '≥'],
628 \ ['geq' , '≥'], 679 \ ['geq' , '≥'],
629 \ ['geqq' , '≧'], 680 \ ['geqq' , '≧'],
630 \ ['gets' , '←'], 681 \ ['gets' , '←'],
631 \ ['gneqq' , '≩'], 682 \ ['gneqq' , '≩'],
632 \ ['gtrdot' , '⋗'], 683 \ ['gtrdot' , '⋗'],
633 \ ['gtreqless' , '⋛'], 684 \ ['gtreqless' , '⋛'],
634 \ ['gtrless' , '≷'], 685 \ ['gtrless' , '≷'],
635 \ ['gtrsim' , '≳'], 686 \ ['gtrsim' , '≳'],
687 \ ['hbar' , 'ℏ'],
688 \ ['heartsuit' , '♡'],
636 \ ['hookleftarrow' , '↩'], 689 \ ['hookleftarrow' , '↩'],
637 \ ['hookrightarrow' , '↪'], 690 \ ['hookrightarrow' , '↪'],
638 \ ['iiint' , '∭'], 691 \ ['iiint' , '∭'],
639 \ ['iint' , '∬'], 692 \ ['iint' , '∬'],
640 \ ['Im' , 'ℑ'], 693 \ ['Im' , 'ℑ'],
694 \ ['imath' , 'ɩ'],
641 \ ['in' , '∈'], 695 \ ['in' , '∈'],
642 \ ['infty' , '∞'], 696 \ ['infty' , '∞'],
643 \ ['int' , '∫'], 697 \ ['int' , '∫'],
644 \ ['lceil' , '⌈'], 698 \ ['lceil' , '⌈'],
645 \ ['ldots' , '…'], 699 \ ['ldots' , '…'],
648 \ ['Leftarrow' , '⟸'], 702 \ ['Leftarrow' , '⟸'],
649 \ ['leftarrowtail' , '↢'], 703 \ ['leftarrowtail' , '↢'],
650 \ ['left(' , '('], 704 \ ['left(' , '('],
651 \ ['left\[' , '['], 705 \ ['left\[' , '['],
652 \ ['left\\{' , '{'], 706 \ ['left\\{' , '{'],
653 \ ['Leftrightarrow' , '⇔'], 707 \ ['leftrightarrow' , '⇔'],
654 \ ['leftrightsquigarrow', '↭'], 708 \ ['leftrightsquigarrow', '↭'],
655 \ ['leftthreetimes' , '⋋'], 709 \ ['leftthreetimes' , '⋋'],
656 \ ['leq' , '≤'], 710 \ ['leq' , '≤'],
657 \ ['leqq' , '≦'], 711 \ ['leqq' , '≦'],
658 \ ['lessdot' , '⋖'], 712 \ ['lessdot' , '⋖'],
665 \ ['mapsto' , '↦'], 719 \ ['mapsto' , '↦'],
666 \ ['measuredangle' , '∡'], 720 \ ['measuredangle' , '∡'],
667 \ ['mid' , '∣'], 721 \ ['mid' , '∣'],
668 \ ['mp' , '∓'], 722 \ ['mp' , '∓'],
669 \ ['nabla' , '∇'], 723 \ ['nabla' , '∇'],
724 \ ['natural' , '♮'],
670 \ ['ncong' , '≇'], 725 \ ['ncong' , '≇'],
671 \ ['nearrow' , '↗'], 726 \ ['nearrow' , '↗'],
672 \ ['ne' , '≠'], 727 \ ['ne' , '≠'],
673 \ ['neg' , '¬'], 728 \ ['neg' , '¬'],
674 \ ['neq' , '≠'], 729 \ ['neq' , '≠'],
703 \ ['ominus' , '⊖'], 758 \ ['ominus' , '⊖'],
704 \ ['oplus' , '⊕'], 759 \ ['oplus' , '⊕'],
705 \ ['oslash' , '⊘'], 760 \ ['oslash' , '⊘'],
706 \ ['otimes' , '⊗'], 761 \ ['otimes' , '⊗'],
707 \ ['owns' , '∋'], 762 \ ['owns' , '∋'],
763 \ ['P' , '¶'],
708 \ ['partial' , '∂'], 764 \ ['partial' , '∂'],
709 \ ['perp' , '⊥'], 765 \ ['perp' , '⊥'],
710 \ ['pitchfork' , '⋔'], 766 \ ['pitchfork' , '⋔'],
711 \ ['pm' , '±'], 767 \ ['pm' , '±'],
712 \ ['precapprox' , '⪷'], 768 \ ['precapprox' , '⪷'],
714 \ ['preccurlyeq' , '≼'], 770 \ ['preccurlyeq' , '≼'],
715 \ ['preceq' , '⪯'], 771 \ ['preceq' , '⪯'],
716 \ ['precnapprox' , '⪹'], 772 \ ['precnapprox' , '⪹'],
717 \ ['precneqq' , '⪵'], 773 \ ['precneqq' , '⪵'],
718 \ ['precsim' , '≾'], 774 \ ['precsim' , '≾'],
775 \ ['prime' , '′'],
719 \ ['prod' , '∏'], 776 \ ['prod' , '∏'],
720 \ ['propto' , '∝'], 777 \ ['propto' , '∝'],
721 \ ['rceil' , '⌉'], 778 \ ['rceil' , '⌉'],
722 \ ['Re' , 'ℜ'], 779 \ ['Re' , 'ℜ'],
723 \ ['rfloor' , '⌋'], 780 \ ['rfloor' , '⌋'],
730 \ ['rightsquigarrow', '↝'], 787 \ ['rightsquigarrow', '↝'],
731 \ ['rightthreetimes', '⋌'], 788 \ ['rightthreetimes', '⋌'],
732 \ ['risingdotseq' , '≓'], 789 \ ['risingdotseq' , '≓'],
733 \ ['rmoustache' , '╮'], 790 \ ['rmoustache' , '╮'],
734 \ ['rtimes' , '⋊'], 791 \ ['rtimes' , '⋊'],
792 \ ['S' , '§'],
735 \ ['searrow' , '↘'], 793 \ ['searrow' , '↘'],
736 \ ['setminus' , '∖'], 794 \ ['setminus' , '∖'],
795 \ ['sharp' , '♯'],
737 \ ['sim' , '∼'], 796 \ ['sim' , '∼'],
797 \ ['spadesuit' , '♠'],
738 \ ['sphericalangle' , '∢'], 798 \ ['sphericalangle' , '∢'],
739 \ ['sqcap' , '⊓'], 799 \ ['sqcap' , '⊓'],
740 \ ['sqcup' , '⊔'], 800 \ ['sqcup' , '⊔'],
741 \ ['sqsubset' , '⊏'], 801 \ ['sqsubset' , '⊏'],
742 \ ['sqsubseteq' , '⊑'], 802 \ ['sqsubseteq' , '⊑'],
765 \ ['swarrow' , '↙'], 825 \ ['swarrow' , '↙'],
766 \ ['therefore' , '∴'], 826 \ ['therefore' , '∴'],
767 \ ['times' , '×'], 827 \ ['times' , '×'],
768 \ ['to' , '→'], 828 \ ['to' , '→'],
769 \ ['top' , '⊤'], 829 \ ['top' , '⊤'],
830 \ ['triangle' , '∆'],
770 \ ['triangleleft' , '⊲'], 831 \ ['triangleleft' , '⊲'],
771 \ ['trianglelefteq' , '⊴'], 832 \ ['trianglelefteq' , '⊴'],
772 \ ['triangleq' , '≜'], 833 \ ['triangleq' , '≜'],
773 \ ['triangleright' , '⊳'], 834 \ ['triangleright' , '⊳'],
774 \ ['trianglerighteq', '⊵'], 835 \ ['trianglerighteq', '⊵'],
786 \ ['vdots' , '⋮'], 847 \ ['vdots' , '⋮'],
787 \ ['veebar' , '⊻'], 848 \ ['veebar' , '⊻'],
788 \ ['vee' , '∨'], 849 \ ['vee' , '∨'],
789 \ ['Vvdash' , '⊪'], 850 \ ['Vvdash' , '⊪'],
790 \ ['wedge' , '∧'], 851 \ ['wedge' , '∧'],
852 \ ['wp' , '℘'],
791 \ ['wr' , '≀']] 853 \ ['wr' , '≀']]
792 for texmath in s:texMathList 854 for texmath in s:texMathList
793 if texmath[0] =~ '\w$' 855 if texmath[0] =~ '\w$'
794 exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] 856 exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
795 else 857 else
802 syn match texMathSymbol '\\ll\>' contained conceal cchar=≪ 864 syn match texMathSymbol '\\ll\>' contained conceal cchar=≪
803 else 865 else
804 syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫ 866 syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫
805 syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪ 867 syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪
806 endif 868 endif
869
870 syn match texMathSymbol '\\hat{a}' contained conceal cchar=â
871 syn match texMathSymbol '\\hat{A}' contained conceal cchar=Â
872 syn match texMathSymbol '\\hat{c}' contained conceal cchar=ĉ
873 syn match texMathSymbol '\\hat{C}' contained conceal cchar=Ĉ
874 syn match texMathSymbol '\\hat{e}' contained conceal cchar=ê
875 syn match texMathSymbol '\\hat{E}' contained conceal cchar=Ê
876 syn match texMathSymbol '\\hat{g}' contained conceal cchar=ĝ
877 syn match texMathSymbol '\\hat{G}' contained conceal cchar=Ĝ
878 syn match texMathSymbol '\\hat{i}' contained conceal cchar=î
879 syn match texMathSymbol '\\hat{I}' contained conceal cchar=Î
880 syn match texMathSymbol '\\hat{o}' contained conceal cchar=ô
881 syn match texMathSymbol '\\hat{O}' contained conceal cchar=Ô
882 syn match texMathSymbol '\\hat{s}' contained conceal cchar=ŝ
883 syn match texMathSymbol '\\hat{S}' contained conceal cchar=Ŝ
884 syn match texMathSymbol '\\hat{u}' contained conceal cchar=û
885 syn match texMathSymbol '\\hat{U}' contained conceal cchar=Û
886 syn match texMathSymbol '\\hat{w}' contained conceal cchar=ŵ
887 syn match texMathSymbol '\\hat{W}' contained conceal cchar=Ŵ
888 syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ
889 syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ
807 endif 890 endif
808 891
809 " Greek {{{2 892 " Greek {{{2
810 if s:tex_conceal =~ 'g' 893 if s:tex_conceal =~ 'g'
811 fun! s:Greek(group,pat,cchar) 894 fun! s:Greek(group,pat,cchar)
853 delfun s:Greek 936 delfun s:Greek
854 endif 937 endif
855 938
856 " Superscripts/Subscripts {{{2 939 " Superscripts/Subscripts {{{2
857 if s:tex_conceal =~ 's' 940 if s:tex_conceal =~ 's'
858 syn region texSuperscript matchgroup=Delimiter start='\^{' end='}' contained concealends contains=texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher 941 syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
859 syn region texSubscript matchgroup=Delimiter start='_{' end='}' contained concealends contains=texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher 942 syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
860 fun! s:SuperSub(group,leader,pat,cchar) 943 fun! s:SuperSub(group,leader,pat,cchar)
861 exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar 944 exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
862 exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' 945 exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
863 endfun 946 endfun
864 call s:SuperSub('texSuperscript','\^','0','⁰') 947 call s:SuperSub('texSuperscript','\^','0','⁰')
978 endif 1061 endif
979 let i= i + 1 1062 let i= i + 1
980 endfor 1063 endfor
981 endfun 1064 endfun
982 " \` \' \^ \" \~ \. \c \H \k \r \u \v 1065 " \` \' \^ \" \~ \. \c \H \k \r \u \v
983 call s:Accents('a','à','á','â','ä','ã',' ',' ',' ','ą','å','ă','ă') 1066 call s:Accents('a','à','á','â','ä','ã','ȧ',' ',' ','ą','å','ă','ă')
984 call s:Accents('A','À','Á','Â','Ä','Ã',' ',' ',' ','Ą','Å','Ă','Ă') 1067 call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ',' ',' ','Ą','Å','Ă','Ă')
985 call s:Accents('c',' ','ć','ĉ',' ',' ','ċ','ç',' ',' ',' ',' ','č') 1068 call s:Accents('c',' ','ć','ĉ',' ',' ','ċ','ç',' ',' ',' ',' ','č')
986 call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ','Ç',' ',' ',' ',' ','Č') 1069 call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ','Ç',' ',' ',' ',' ','Č')
987 call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď') 1070 call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
988 call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď') 1071 call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
989 call s:Accents('e','è','é','ê','ë','ẽ','ė','ȩ',' ','ę',' ','ĕ','ě') 1072 call s:Accents('e','è','é','ê','ë','ẽ','ė','ȩ',' ','ę',' ','ĕ','ě')
990 call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ȩ',' ','Ę',' ','Ĕ','Ě') 1073 call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ȩ',' ','Ę',' ','Ĕ','Ě')
991 call s:Accents('g',' ',' ',' ',' ',' ','ġ','ģ',' ',' ',' ','ğ',' ') 1074 call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ','ģ',' ',' ',' ','ğ',' ')
992 call s:Accents('G',' ',' ',' ',' ',' ','Ġ','Ģ',' ',' ',' ','Ğ',' ') 1075 call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ','Ģ',' ',' ',' ','Ğ',' ')
1076 call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
1077 call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
993 call s:Accents('i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ','ĭ',' ') 1078 call s:Accents('i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ','ĭ',' ')
994 call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ',' ',' ',' ',' ','Ĭ',' ') 1079 call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ',' ',' ',' ',' ','Ĭ',' ')
1080 call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
1081 call s:Accents('k',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ',' ')
1082 call s:Accents('K',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ',' ')
995 call s:Accents('l',' ','ĺ','ľ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ') 1083 call s:Accents('l',' ','ĺ','ľ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
996 call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ') 1084 call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
997 call s:Accents('n',' ','ń',' ',' ','ñ',' ','ņ',' ',' ',' ',' ','ň') 1085 call s:Accents('n',' ','ń',' ',' ','ñ',' ','ņ',' ',' ',' ',' ','ň')
998 call s:Accents('N',' ','Ń',' ',' ','Ñ',' ','Ņ',' ',' ',' ',' ','Ň') 1086 call s:Accents('N',' ','Ń',' ',' ','Ñ',' ','Ņ',' ',' ',' ',' ','Ň')
999 call s:Accents('o','ò','ó','ô','ö','õ','ȯ',' ','ő','ǫ',' ','ŏ',' ') 1087 call s:Accents('o','ò','ó','ô','ö','õ','ȯ',' ','ő','ǫ',' ','ŏ',' ')
1000 call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ',' ','Ő','Ǫ',' ','Ŏ',' ') 1088 call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ',' ','Ő','Ǫ',' ','Ŏ',' ')
1001 call s:Accents('r',' ','ŕ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř') 1089 call s:Accents('r',' ','ŕ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
1002 call s:Accents('R',' ','Ŕ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř') 1090 call s:Accents('R',' ','Ŕ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
1003 call s:Accents('s',' ','ś','ŝ',' ',' ',' ','ş',' ',' ',' ',' ','š') 1091 call s:Accents('s',' ','ś','ŝ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
1004 call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ','Ş',' ',' ',' ',' ','Š') 1092 call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
1005 call s:Accents('t',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť') 1093 call s:Accents('t',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
1006 call s:Accents('T',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť') 1094 call s:Accents('T',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
1007 call s:Accents('u','ù','ú','û','ü','ũ',' ',' ','ű',' ','ů','ŭ',' ') 1095 call s:Accents('u','ù','ú','û','ü','ũ',' ',' ','ű','ų','ů','ŭ','ǔ')
1008 call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ',' ','Ű',' ','Ů','Ŭ',' ') 1096 call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ',' ','Ű','Ų','Ů','Ŭ','Ǔ')
1009 call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ') 1097 call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
1010 call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ') 1098 call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
1011 call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ') 1099 call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ')
1012 call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ') 1100 call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ')
1013 call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ','ž') 1101 call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ','ž')
1066 endif 1154 endif
1067 endif 1155 endif
1068 HiLink texError Error 1156 HiLink texError Error
1069 endif 1157 endif
1070 1158
1159 HiLink texCite texRefZone
1071 HiLink texDefCmd texDef 1160 HiLink texDefCmd texDef
1072 HiLink texDefName texDef 1161 HiLink texDefName texDef
1073 HiLink texDocType texCmdName 1162 HiLink texDocType texCmdName
1074 HiLink texDocTypeArgs texCmdArgs 1163 HiLink texDocTypeArgs texCmdArgs
1075 HiLink texInputFileOpt texCmdArgs 1164 HiLink texInputFileOpt texCmdArgs
1090 HiLink texMathZoneX texMath 1179 HiLink texMathZoneX texMath
1091 HiLink texMathZoneY texMath 1180 HiLink texMathZoneY texMath
1092 HiLink texMathZoneV texMath 1181 HiLink texMathZoneV texMath
1093 HiLink texMathZoneZ texMath 1182 HiLink texMathZoneZ texMath
1094 endif 1183 endif
1095 HiLink texRefZone Identifier
1096 HiLink texSectionMarker texCmdName 1184 HiLink texSectionMarker texCmdName
1097 HiLink texSectionName texSection 1185 HiLink texSectionName texSection
1098 HiLink texSpaceCode texStatement 1186 HiLink texSpaceCode texStatement
1099 HiLink texStyleStatement texStatement 1187 HiLink texStyleStatement texStatement
1100 HiLink texTypeSize texType 1188 HiLink texTypeSize texType
1101 HiLink texTypeStyle texType 1189 HiLink texTypeStyle texType
1102 1190
1103 " Basic TeX highlighting groups 1191 " Basic TeX highlighting groups
1104 HiLink texCite Special
1105 HiLink texCmdArgs Number 1192 HiLink texCmdArgs Number
1106 HiLink texCmdName Statement 1193 HiLink texCmdName Statement
1107 HiLink texComment Comment 1194 HiLink texComment Comment
1108 HiLink texDef Statement 1195 HiLink texDef Statement
1109 HiLink texDefParm Special 1196 HiLink texDefParm Special
1115 HiLink texMathDelim Statement 1202 HiLink texMathDelim Statement
1116 HiLink texMathOper Operator 1203 HiLink texMathOper Operator
1117 HiLink texNewCmd Statement 1204 HiLink texNewCmd Statement
1118 HiLink texNewEnv Statement 1205 HiLink texNewEnv Statement
1119 HiLink texOption Number 1206 HiLink texOption Number
1120 HiLink texRefLabel Special 1207 HiLink texRefZone Special
1121 HiLink texSection PreCondit 1208 HiLink texSection PreCondit
1122 HiLink texSpaceCodeChar Special 1209 HiLink texSpaceCodeChar Special
1123 HiLink texSpecialChar SpecialChar 1210 HiLink texSpecialChar SpecialChar
1124 HiLink texStatement Statement 1211 HiLink texStatement Statement
1125 HiLink texString String 1212 HiLink texString String