Dear expeRts,

I'm trying to use the package SweaveListingUtils, but the rather minimal example
below leads to

,----
| ./minimal.tex:43: Undefined control sequence.
| l.43 \lstdefinelanguage
|                        {Rd}[common]{TeX}%
| ?
`----

Why?

Cheers,

Marius

\documentclass[article]{jss}

\author{foo \And bar}
\Address{
  foo
  \bigskip
  bar
}
\title{foo bar}
\Plainauthor{foo, bar}
\Plaintitle{foo bar}
\Abstract{foo and bar.}
\Keywords{\R, foo, bar}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage{microtype}
\usepackage{Sweave}
\usepackage{fancyvrb}
% do *not* delete the following line! see 
https://stat.ethz.ch/pipermail/r-help/2009-July/204747.html
% this comment persuades Sweave not to insert \usepackage{Sweave}

% Sweave
\fvset{listparameters={\setlength{\topsep}{-2pt}}}
\renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}}

% SweaveListingUtils
\SweaveOpts{keep.source=TRUE}
<<label=SweaveListingsPreparations, results=tex, echo=FALSE, 
strip.white=false>>=
require(SweaveListingUtils)
SweaveListingPreparations()
@

\begin{document}
<<foo_bar>>=
f <- function(n) runif(n, min=-1, max=1)
mean(f(100))
@
\end{document}

<<cleanup, echo=FALSE>>=
unloadNamespace("SweaveListingUtils")
@

______________________________________________
R-help@r-project.org 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.

Reply via email to