6

I'm using vim with the latex-suite package installed on Ubuntu 11.10 to edit LaTeX files. The latex-suite highlights the LaTeX source as I edit it, but it seems to get very confused after something like $\sigma_{\{x,y\}}$. The LaTeX code is correct; it compiles and displays fine, but highlighting after this symbol is very strange. I tried to post a picture of what I get, but apparently new users can't post pictures. Here is some example code which causes problems for me:

\documentclass{article}
\begin{document}
This text appears normally.  $\sigma_{\{x,y\}}$

But this text is highlighted very strangely.
\end{document}

Is there a way to fix this? As it is, I'd say the highlighting scheme in vim-latex is a little aggressive; I could do with something quite a bit simpler (e.g. one color for text, one for math, and one for environment declarations like \begin{environementName} and \end{environmentName}).

enter image description here

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • Seems to be a bug in the latex-suite. You can work around this using \( and \) to enter math mode, which is the recommended way. – Marco Apr 17 '12 at 10:35
  • Ah! Thank you. That at least localizes the problem to the math-mode area, and makes the rest of my document readable. The slash before the left-brace is still orange, so something is still not quite right, but it's much better now. – joelwatsonfish Apr 17 '12 at 12:05

1 Answers1

2

This behaviour is a bug of Ubuntu 11.*. I guess there are some problems with some libraries. However cmhughes tested your example under Ubuntu 10.04 without these odd highlighting. I tested your example under 11.10 and was able to reproduce this behaviour. Now I tested the same example under Ubuntu 12.04 and the bug seems to be fixed. I get the correct result.

enter image description here

Marco Daniel
  • 95,681