Texmaker and TeXstudioSweave Syntax Highlighting

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
alphaace
Posts: 5
Joined: Thu Jul 16, 2009 6:11 pm

Sweave Syntax Highlighting

Post by alphaace »

Hi,

I work with sweave a lot and it often happens that my generated R code has a "$" sign symbol, such as when I reference an element of a list. However, when I get my code into texmaker, all the syntax after the dollar symbol is highlighted green.

For example, in my code I have the following:

\begin{Schunk}
\begin{Sinput}
......data$age....
\end{Sinput}
\end{Schunk}

However, because of the dollar sign, all my code afterwards is the wrong color. This doesn't happen in Texshop on my mac and I was wondering if there is a way around this?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply