2013-11-03 05:49:18 -05:00
|
|
|
" Better support for cite commands
|
|
|
|
" \cite, \citep, \citet, \citeauthor, ...
|
|
|
|
syn match texRefZone
|
2013-12-15 07:44:36 -05:00
|
|
|
\ "\\\(auto\|text\)cite\%([tp]\*\=\|author\)\="
|
2013-11-03 05:49:18 -05:00
|
|
|
\ nextgroup=texRefOption,texCite
|
|
|
|
|
2013-10-16 04:17:08 -04:00
|
|
|
" Add support for cleverref package
|
|
|
|
" \Cref, \cref, \cpageref, \labelcref, \labelcpageref
|
2013-10-05 07:53:42 -04:00
|
|
|
syn region texRefZone matchgroup=texStatement
|
2013-10-16 04:17:08 -04:00
|
|
|
\ start="\\\(\(label\)\?c\(page\)\?\|C\)ref{"
|
2013-10-05 07:53:42 -04:00
|
|
|
\ end="}\|%stopzone\>"
|
|
|
|
\ contains=@texRefGroup
|
2013-10-16 04:17:08 -04:00
|
|
|
|
|
|
|
" \crefrange, \cpagerefrange (these commands expect two arguments)
|
|
|
|
syn match texStatement
|
|
|
|
\ '\\c\(page\)\?refrange\>'
|
2013-10-17 07:33:52 -04:00
|
|
|
\ nextgroup=texRefRangeStart skipwhite skipnl
|
|
|
|
syn region texRefRangeStart
|
|
|
|
\ start="{"rs=s+1 end="}"
|
|
|
|
\ matchgroup=Delimiter
|
|
|
|
\ contained contains=texRefZone
|
|
|
|
\ nextgroup=texRefRangeEnd skipwhite skipnl
|
|
|
|
syn region texRefRangeEnd
|
|
|
|
\ start="{"rs=s+1 end="}"
|
|
|
|
\ matchgroup=Delimiter
|
|
|
|
\ contained contains=texRefZone
|
2013-10-16 04:17:08 -04:00
|
|
|
hi link texRefRangeStart texRefZone
|
|
|
|
hi link texRefRangeEnd texRefZone
|
2014-02-09 09:44:55 -05:00
|
|
|
|
|
|
|
" Support for listings package
|
|
|
|
syn region texZone
|
|
|
|
\ start="\\begin{lstlisting}"
|
|
|
|
\ end="\\end{lstlisting}\|%stopzone\>"
|
|
|
|
syn region texZone
|
|
|
|
\ start="\\lstinputlisting"
|
|
|
|
\ end="{\s*[a-zA-Z/.0-9_^]\+\s*}"
|
|
|
|
syn match texInputFile
|
|
|
|
\ "\\lstinline\s*\(\[.*\]\)\={.\{-}}"
|
|
|
|
\ contains=texStatement,texInputCurlies,texInputFileOpt
|