Page 1 of 1

syntax conflicts

Posted: Tue Sep 07, 2010 2:13 pm
by tddlmo
I'm new to syn files, LaTeX, and R. I've come across *.rnw files for "sweave" which allows embedding R code in LaTex files. There is an R.syn and a LaTeX.syn, so I thought I would merge the 2 to create an rnw.syn file. One problem (so far), "$" denotes the start and end of comments in LaTeX, but has other uses and meanings in R. So my highlighting between "$" characters gets greyed out in the R blocks.
If it helps - in rnw files, R code is always between delimited by a line beginning with "<<" and a line composed of a single "@" character.
...
Would anyone have any suggestions as to how to resolve such syntax conflicts?