Skip to content

Latex error with Sweave example

4 messages · paul sorenson, Duncan Murdoch, Uwe Ligges

#
I created a tex file following the example in the Sweave help which 
produced the following files in my working directory.

Sweave-test-1-006.eps
Sweave-test-1-006.pdf
Sweave-test-1-007.eps
Sweave-test-1-007.pdf
Sweave-test-1.tex

When I run latex on this, I get a latex error, log file below.  I am 
running R 2.1.1 on Windows XP.  I have installed "small MiKTeX" and I 
have added "C:\Program Files\R\rw2011\share\texmf" to the roots of 
MiKTex.  The MiKTeX test ran fine after I installed it.

Any tips would be most appreciated.

This is e-TeX, Version 3.141592-2.2 (MiKTeX 2.4) (preloaded format=latex 
2005.8.5)  6 AUG 2005 09:28
entering extended mode
**Sweave-test-1
(Sweave-test-1.tex
LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for english, french, german, 
ngerman, du
mylang, nohyphenation, loaded.
(C:\usr\texmf\tex\latex\base\article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(C:\usr\texmf\tex\latex\base\size10.clo
File: size10.clo 2004/02/16 v1.4f 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
)
(C:\usr\texmf\tex\latex\ltxmisc\a4wide.sty
Package: a4wide 1994/08/30

(C:\usr\texmf\tex\latex\ntgclass\a4.sty
Package: a4 1999/03/03 v1.2f A4 based page layout
))
! Missing \endcsname inserted.
<to be read again>
                    \protect
l.11 \begin
            {document}
?
! Emergency stop.
<to be read again>
                    \protect
l.11 \begin
            {document}
End of file on the terminal!


Here is how much of TeX's memory you used:
  223 strings out of 95898
  2212 string characters out of 1195177
  46816 words of memory out of 1050593
  3336 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,0n,17p,117b,36s stack positions out of 1500i,500n,5000p,200000b,32768s
No pages of output.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Sweave-test-1.tex
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050806/3f35b51d/Sweave-test-1.pl
#
sosman wrote:
I think you need to ask on one of the Miktex lists.  My guess would be 
that your problem is caused by using e-TeX, but I couldn't say for sure. 
  Certainly the error is occurring entirely within MikTeX packages; you 
haven't got to the R stuff yet.

My web page

http://www.murdoch-sutherland.com/Rtools/miktex.html

is getting kind of old, but it does tell you how to avoid using e-TeX.

Duncan Murdoch
#
I do not think that the file specification in

\usepackage{C:/PROGRA~1/R/rw2011/share/texmf/Sweave}

is supported....

Rather use \usepackage{Sweave} and put Sweave.sty somewhere in the 
search path of LaTeX (either in some of its directories - do not forget 
to 'texhash' - or in the local directory).

Uwe Ligges
sosman wrote:
#
sosman wrote:
[snip]

Thanks for the replies - I have worked around the problem by running 
latex on my Fedora machine.  I will leave getting MiKTeX running to a 
rainy day.

Actually after some further digging - I ended up using latex2html, I am 
using this for daily metrics and the main requirement is for presenting 
and annotating plots.

cheers