首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Rstudio在设置RSTUDIO_PDFLATEX环境变量后找不到pdflatex

Rstudio在设置RSTUDIO_PDFLATEX环境变量后找不到pdflatex
EN

Stack Overflow用户
提问于 2021-01-16 11:14:40
回答 1查看 202关注 0票数 0

我已经安装了latex,并在RSTUDIO_PDFLATEX环境变量中指定了路径。但它仍然无法找到它,并一直让我安装Miktex或tinytex,而我并不想这样做。有人知道为什么吗?

代码语言:javascript
运行
复制
> Sys.getenv("RSTUDIO_PDFLATEX")
[1] "/home/victor/local/texlive/2020/bin/x86_64-linux/pdflatex"
代码语言:javascript
运行
复制
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS ddd.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output ddd.tex --lua-filter /home/victor/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/victor/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in' 
output file: ddd.knit.md

! sh: 1: pdflatex: not found

Error: LaTeX failed to compile ddd.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See ddd.log for more info.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
  error in running command
Execution halted

No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/

  If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

  Otherwise consider MiKTeX on Windows - http://miktex.org
EN

回答 1

Stack Overflow用户

发布于 2021-01-16 12:03:32

我在系统环境变量PATH中添加了texlive的目录,并重新启动系统后,Rstudio终于可以找到pdflatex了!

但是,如果有人知道如何使用RSTUDIO_PDFLATEX,欢迎留下评论!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65746136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档