Skip to content

Commit 9fc3d20

Browse files
committed
Add support for tex_math_single_backslash
1 parent ea15560 commit 9fc3d20

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

syntax/pandoc.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ call s:WithConceal('html_c_e', 'syn match pandocHTMLCommentEnd /-->/ contained',
211211
unlet b:current_syntax
212212
syn include @LATEX syntax/tex.vim
213213
syn region pandocLaTeXInlineMath start=/\\\@<!\$[[:graph:]]\@=/ end=/\\\@<!\$/ keepend contains=@LATEX
214+
syn region pandocLaTeXInlineMath start=/\\\@<!\\([[:graph:]]\@=/ end=/\\\@<!\\)/ keepend contains=@LATEX
214215
syn match pandocProtectedFromInlineLaTeX /\\\@<!\${.*}\(\(\s\|[[:punct:]]\)\([^$]*\|.*\(\\\$.*\)\{2}\)\n\n\|$\)\@=/ display
215216
" contains=@LATEX
216217
syn region pandocLaTeXMathBlock start=/\$\$/ end=/\$\$/ keepend contains=@LATEX

tests/latex.pdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
This is a paragraph with $\text{inline} \LaTeX$.
2+
This is a paragraph with \(\text{inline} \LaTeX\) using the tex_math_single_backslash extension.
23

34
This \$ is a dollar sign. $ this too. $30000 dollars are mentioned in pandoc's
45
Example. I don't have that amount.

0 commit comments

Comments
 (0)