n370 / texmaker

Automatically exported from code.google.com/p/texmaker
0 stars 0 forks source link

Code highlighting with Sweave; using $ in \Sexpr not working properly #490

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This report concerns Sweave (Rnw) files.

When you use $ in \Sexpr{}, then the highlighting assumes that it starts a math 
environment. However it has a different meaning in R code.

E.g. \Sexpr{data$sub} already messes up the highlighting afterwards.

Expected behaviour:
Code should not be highlighted in \Sexpr{} or similar Sweave "commands" at all 
(as it is done for the main Sweave block, between <<>>= and @).

Bug is present in 3.2.2.
I have attached a snapshot that shows this bug and the Rnw file I used to 
reproduce this.

Original issue reported on code.google.com by morten.p...@gmail.com on 30 Jan 2012 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem with "minted" environment.

Original comment by ant.duca on 12 Jun 2014 at 12:07