我是 sweave 新手,总是出错。我尝试运行以下文件:
\documentclass[a4paper]{article}
\begin{document}
\SweaveOpts{concordance=TRUE}
Hello world!
\end{document}
我刚刚收到错误消息:
Writing to file sweavetut.tex
Processing code chunks with options ...
You can now run (pdf)latex on 'sweavetut.tex'
Running pdflatex.exe on sweavetut.tex...failed
Error running C:/texlive/2015/bin/win32/pdflatex.exe (exit code 1)
我在 Windows 中的 Rstudio 上使用 Sweave:
version.string R version 3.3.0 (2016-05-03)
文件 C:\texlive\2015\bin\win32\pdflatex.exe 存在,所以我不确定哪里出了问题。
更新:
当我尝试在 TeXworks 中排版 sweavetut.tex 时,出现以下错误:
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./sweavetut.tex
LaTeX2e <2016/03/31>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(c:/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2015/texmf-dist/tex/latex/base/size10.clo))
! LaTeX Error: File `Sweave.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name: