RStudio - 未找到文件错误,但文件存在

RStudio - 未找到文件错误,但文件存在

我刚刚在工作笔记本电脑上安装完 MiKTeX 2.9,以便可以将其与 RStudio v1.0.153 一起使用。
我只运行选择新建 >> R Notebook 时获得的默认 R Notebook 文件。保存并单击 Knit 后,出现以下错误:

  processing file: test7.Rmd
  |...........................................                      |  67%
label: unnamed-chunk-1
  |.................................................................| 100%
  ordinary text without R code


output file: test7.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test7.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test7.pdf --template "C:\Rpackages\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --variable graphics=yes --variable "geometry:margin=1in" 
! LaTeX Error: File `mathspec.sty' not found.

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

Enter file name: 
! Emergency stop.
<read *> 

l.12   \else

pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test7.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test7.pdf --template "C:\Rpackages\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --variable graphics=yes --variable "geometry:margin=1in"' had status 43 
Execution halted

我看到的第一个错误是! LaTeX Error: Filemathspec.sty' not found.` 但是当我进入 MiKTeX 控制台时,我可以看到该文件实际上在那里: 在此处输入图片描述

所以也许 R 在错误的地方寻找这个包。这台电脑有几个防火墙,我认为这可能是导致这些问题的原因。' 有人能帮我找出问题可能出在哪里吗?

谢谢

相关内容