简体   繁体   English

更新R版本后exams2pdf的问题

[英]Problems with exams2pdf after updating R version

Recently, I have updated R using installr so that I have now two versions (3.6.1 e 4.0.3) installed in my computer running Windows 10, but I only use the 4.0.3 version.最近,我使用安装程序更新了installr ,因此我现在在运行 Windows 10 的计算机上安装了两个版本(3.6.1 和 4.0.3),但我只使用 4.0.3 版本。 For some reasons I do not know, the 'exams' package has not been transferred to the new version so I had to reinstall it, but now 'exams2pdf' does not work anymore and I get the following error message:由于某些我不知道的原因,'exams' package 尚未转移到新版本,所以我不得不重新安装它,但现在'exams2pdf' 不再工作,我收到以下错误消息:

LaTeX Error: File `Sweave.sty' not found. LaTeX 错误:找不到文件“Sweave.sty”。

Any help would be very much appreciated.任何帮助将不胜感激。

I opened the MikTeX Console, selected: Settings > Directories, and then the small + button to add the folder "C:\Program Files\R\R-4.0.3\share\texmf".我打开 MikTeX 控制台,选择:设置 > 目录,然后按小 + 按钮添加文件夹“C:\Program Files\R\R-4.0.3\share\texmf”。 Now I do not get anymore the error message and it works.现在我不再收到错误消息并且它有效。

I would guess that you have the R package tinytex installed which does not always find the Sweave.sty file that is shipped in base R's texmf folder.我猜你已经安装了 R package tinytex ,它并不总能找到 base R 的texmf文件夹中附带的Sweave.sty文件。 Installing the file in a texmf folder where it is easier to find (as you did in your answer) is one possibility to solve the problem.将文件安装在更容易找到的texmf文件夹中(正如您在回答中所做的那样)是解决问题的一种可能性。 Uninstalling the R package tinytex probably would have also solved the problem.卸载 R package tinytex可能也可以解决问题。 Or you could use a template that avoids using Sweave.sty .或者您可以使用避免使用Sweave.sty的模板。

For further details on using LaTeX with R/exams, see http://www.R-exams.org/tutorials/latex/ .有关在 R/exams 中使用 LaTeX 的更多详细信息,请参阅http://www.R-exams.org/tutorials/latex/ This question and answer is also related: How to configure R/Exams to use system LaTeX?这个问答也相关: How to configure R/Exams to use system LaTeX?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM