Document Classes ⇒ lstlisting - language R- special character
lstlisting - language R- special character
basicstyle=\ttfamily,
keywordstyle=\bfseries,
showstringspaces=false,
columns = fullflexible,
mathescape = true,
language=R
}
\begin{lstlisting}
lst$val<-val
\end{lstlisting}
./software.tex:16:Extra }, or forgotten \endgroup. lst$
the culprit here is the $ sign. that's aproblem because xxx$y is a common command in R.
thanks.
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
- Stefan Kottwitz
- Site Admin
- Posts: 10362
- Joined: Mon Mar 10, 2008 9:44 pm
lstlisting - language R- special character
do you need mathescape? It would work if you didn't set mathescape = true.
Stefan