I recommend emacs http://ftp.gnu.org/pub/gnu/emacs
It has modes for TeX and LaTeX and automatically chooses the right one. As a side benefit once you have emacs you can then run R through ESS, the package that provides the modes for handling statistical languages http://ess.r-project.org/ ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.