0

When editing .Rnw files with emacs, sometimes it gets confused as to if I am in math mode or not. Then, the syntax highlighting gets messed up, and C-f-i inserts \textit{} and \mathit{} opposite to how it normally should. Is seems like there is some bool storing the state of math mode or not, and it gets inadvertently flipped. Is there a way I can manually flip it back?

stevejb
  • 2,414
  • 5
  • 26
  • 41

1 Answers1

0

I've noticed that this usually corrects itself if I insert a new R chunk and then delete it. Not an elegant solution, but it works for me.

Ista
  • 10,139
  • 2
  • 37
  • 38
  • Thanks. Yes, not elegant, and I can't always get that to fix it. I need to figure out how to reproduce the problem and try to isolate it. I think the first step is to be very close for an important document... :) – stevejb Apr 29 '10 at 03:21