Tell me more ×
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.

In latex I need to type the sequence$G^{\{ x \}}$ to get the desired equation. The equation works fine, but after this spell check does not work for the remaining text. Spell check works fine before the occurrence of this word and works find if I delete such occurrence. If the same sequence occurs outside maths mode i.e not inside $ $, then there is no problem.

I get issues with syntax highlighting also after the occurrence of that sequence. What is the issue here.

share|improve this question
I do not seem to be able to recreate your problem. I don't think it is particularly related with that exact sequence. Sometimes it happens in long files, that the syntax highlighting is messed up. Try executing :set ft=tex. – canaaerus Sep 19 '12 at 6:26
That did not help. if i change the sequence to $G^{(x )}$ it works, so the problem is very particular about this sequence particularly \}` and \{. – DurgaDatta Sep 19 '12 at 11:03
Try adding %stopzone after that sequence. – Aditya Dec 5 '12 at 1:09
@DurgaDatta Does this problem still exist? Has there been an update that solved the problem? Does using \( and \) instead of $ help (see vonbrand’s answer)? – Qrrbrbirlbel Mar 5 at 4:16

1 Answer

I'd try \(G^{\{x\}}\). This style (\(...\) instead of $...$, \[...\] instead of $$...$$) is more robust (a forgotten end won't mess up reams of text, it is visually clearer where it starts/ends), and is less likely to mess up the editor's parsing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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