Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

closed as off topic by Marco Daniel, percusse, Stefan Kottwitz Apr 28 '12 at 17:11

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
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 Answer 1

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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.