[R] Finding Sweave.sty and other problems

Murray Jorgensen maj at stats.waikato.ac.nz
Thu Jan 29 05:13:49 CET 2004


Hi,

I've just tried to run example-3 from Friedrich Leish. I'm using R 1.8.1 
and MiKTeX 2.2 on Windows XP.

I go
===
 > library(tools)
 > Sweave("example-3.Snw")
Writing to file example-3.tex
Processing code chunks ...
  1 : term hide
  2 : echo term verbatim
  3 : term tex
  4 : term verbatim eps pdf

You can now run LaTeX on example-3.tex
===
The file example-3.tex looks OK, it starts off
===
\documentclass[a4paper]{article}

\usepackage{C:/PROGRA~1/R/rw1081/share/texmf/Sweave}
\begin{document}


\section*{The Cats Data}
..........
===
but my LaTeX log file tells a sad story:
===
This is TeX, Version 3.141592 (MiKTeX 2.2) (preloaded format=latex 
2000.11.28)  29 JAN 2004 16:36
**example-3.tex
(example-3.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for english, french, german, 
ngerman, du
mylang, nohyphenation, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(C:\texmf\tex\latex\base\size10.clo
File: size10.clo 2001/04/21 v1.4e Standard LaTeX file (size option)
)
\c at part=\count79
\c at section=\count80
\c at subsection=\count81
\c at subsubsection=\count82
\c at paragraph=\count83
\c at subparagraph=\count84
\c at figure=\count85
\c at table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
? s
OK, entering \scrollmode...

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
  ...

l.4 \begin
           {document}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Extra \endcsname.
\@onefilewithoptions ...\@currext -h@@k\endcsname
                                                   \@empty \let 
\CurrentOptio...
l.4 \begin
           {document}
I'm ignoring this, since I wasn't doing a \csname.

! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

! Extra \endcsname.
\@ifl at aded ...er \ifx \csname ver@#2.#1\endcsname
                                                   \relax \expandafter 
\@seco...
l.4 \begin
           {document}
I'm ignoring this, since I wasn't doing a \csname.

! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

! Extra \endcsname.
\@pass at ptions ...xdef \csname opt@#3.#1\endcsname
                                                   {\@ifundefined 
{opt@#3.#1}...
l.4 \begin
           {document}
I'm ignoring this, since I wasn't doing a \csname.

! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

! Extra \endcsname.
<argument> ...e/texmf/Sweave.\@currext \endcsname
                                                   ,
l.4 \begin
           {document}
I'm ignoring this, since I wasn't doing a \csname.

! Missing \endcsname inserted.
<to be read again>
                    \protect
l.4 \begin
           {document}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

! Extra \endcsname.
<argument> ...er@\@currname .\@currext \endcsname
                                                   \@empty 
\InputIfFileExists...
l.4 \begin
           {document}
I'm ignoring this, since I wasn't doing a \csname.


! LaTeX Error: File `C:/PROGRA\unhbox\voidb at x \penalty \@M \ 
{}1/R/rw1081/share
/texmf/Sweave.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: x


Overfull \hbox (689.89102pt too wide) in paragraph at lines 4--4
[][] \OT1/cmr/m/n/10 1/R/rw1081/share/texmf/Sweave.sty-h@@k 
1/R/rw1081/share/te
xmf/Sweave.sty1/R/rw1081/share/texmf/Sweave.sty1/R/rw1081/share/texmf/Sweave.st
y, 1/R/rw1081/share/texmf/Sweave.sty 1/R/rw1081/share/texmf/Sweave.sty
  []

  )
(\end occurred when \ifx on line 4 was incomplete)
(\end occurred when \ifx on line 4 was incomplete)
Here is how much of TeX's memory you used:
  205 strings out of 96052
  1946 string characters out of 1197190
  46593 words of memory out of 1050795
  3221 multiletter control sequences out of 35000
  3640 words of font info for 14 fonts, out of 500000 for 1000
  14 hyphenation exceptions out of 607
  23i,1n,17p,117b,40s stack positions out of 1500i,500n,5000p,200000b,32768s

No pages of output.
===

Any comments welcome!

Murray


-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    +64 7 849 6486 home    Mobile 021 1395 862




More information about the R-help mailing list