diff --git a/syntax/mmd.vim b/syntax/mmd.vim index 1347072..0f6be75 100644 --- a/syntax/mmd.vim +++ b/syntax/mmd.vim @@ -164,6 +164,27 @@ HtmlHiLink mkdLinkAttrib Function HtmlHiLink mkdDelimiter Delimiter +" Maths highlighting (TeX) +" Accepts either multimarkdown bracket notation or $ notation. +" Allows use of literal dollars if they are escaped (\$). If you +" want literal dollars without escaping, you'll have to comment out +" the texinlinemaths line. +syntax include syntax/tex.vim +syn region mmddisplaymaths matchgroup=mkdMath start="\\\\\[" end="\\\\\]" contains=@texMathZoneGroup +syn region texdisplaymaths matchgroup=mkdMath start="\$\$" end="\$\$" skip="\\\$" contains=@texMathZoneGroup +syn region mmdinlinemaths matchgroup=mkdMath start="\\\\(" end="\\\\)" contains=@texMathZoneGroup +" inline maths with $ ... $ +" start is a $ not preceded by another $ - \(\$\)\@