r - RMarkdown 没有编译成 PDF
问题描述
我需要使用 RMarkdown 编译成一个 pdf,但它不起作用。我所有的脚本都可以自己完美运行,但不想在 RMarkdown 中创建 pdf。我需要做什么,我没有使用 RMarkdown 足够知道该怎么做。
这是我的错误输出:
output file: R-Markdown-Midterm.knit.md
A new version of TeX Live has been released. If you need to install or update any LaTeX packages, you have to upgrade TinyTeX with tinytex::reinstall_tinytex(). If it fails to upgrade, you might be using a default random CTAN mirror that has not been fully synced to the main CTAN repository, and you need to wait for a few more days or use a CTAN mirror that is known to be up-to-date (see the "repository" argument on the help page ?tinytex::install_tinytex()).
tlmgr: Local TeX Live (2019) is older than remote repository (2020).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.
! LaTeX Error: File `xcolor.sty' not found.
! Emergency stop.
<read *>
Error: LaTeX failed to compile R-Markdown-Midterm.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See R-Markdown-Midterm.log for more info.
In addition: Warning messages:
1: In in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, :
You changed the working directory to /Users/eruiz/Desktop/Stevens/Summer 2020/FE630 Portfolio Theory and Applications/Midterm/Summer 2020/Code (probably via setwd()). It will be restored to /Users/eruiz/Desktop/Stevens/Summer 2020/FE630 Portfolio Theory and Applications/Midterm/Summer 2020. See the Note section in ?knitr::knit
2: In in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, :
You changed the working directory to /Users/eruiz/Desktop/Stevens/Summer 2020/FE630 Portfolio Theory and Applications/Midterm/Summer 2020/Code (probably via setwd()). It will be restored to /Users/eruiz/Desktop/Stevens/Summer 2020/FE630 Portfolio Theory and Applications/Midterm/Summer 2020. See the Note section in ?knitr::knit
3: In system2("tlmgr", args, ...) :
running command ''tlmgr' search --file --global '/xcolor.sty'' had status 1
Execution halted
解决方案
推荐阅读
- kubernetes - 如何使用 Terraform 在 GKE 中设置非默认服务帐户?
- android - Navigation resets when switching fragments
- reactjs - 从 Apollo 查询设置初始反应上下文状态
- python - 如果在Python中给出行和列的总和,如何找到矩阵的元素
- memory - 如何计算一个非常大的惰性序列中的元素数量?
- sql - 我需要获取每个部门的员工人数
- java - 如何使客户端-服务器套接字应用程序以同步的方式访问数据并对其进行测试
- bash - 收集外部输出(回声)并保存为测试变量
- python - Python不输出sql查询的结果
- math - 最小增量数,使所有元素都有一个公约数