vim-pandoc-syntax icon indicating copy to clipboard operation
vim-pandoc-syntax copied to clipboard

Combination of double backslash, brace, and underscore breaks rendering

Open SuperFluffy opened this issue 7 years ago • 2 comments

I am using the pandoc extension tex_math_double_backslash to be able to use the \( \) and \[ \] math environments. Somehow the combination of these environments together with curly braces and underscores breaks the rendering of the text following these symbols. The following will incorrectly render everything from _i onwards slanted on vim 8.1 with the latest master branches of vim-pandoc and vim-pandoc-syntax:

\\(\ddot{\phi}_i\\)

Rendering is broken

The following changes “fix” rendering:

<!-- Removing the first backslash \ -->
\(\ddot{\phi}_i\\)

Rendering works

<!-- Removing the first the closing curly brace } -->
\\(\ddot{\phi_i\\)

Rendering works

<!-- Removing the underscore _ -->
\\(\ddot{\phi}i\\)

Rendering works

Any idea how to fix this?

SuperFluffy avatar Jul 16 '18 11:07 SuperFluffy

The syntax file has no support for this syntax, so it will have to be implemented.

fmoralesc avatar Jul 16 '18 11:07 fmoralesc

Alright, thanks for pointing this out. I am changing my markup from \\( \\) to $ $ for now, and will leave this issue open.

SuperFluffy avatar Jul 16 '18 11:07 SuperFluffy