You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

quarto::quarto_render()不识别TinyTeX参数?附RStudio渲染疑问

解决Quarto渲染时禁用TeX Live Manager自动更新的问题

问题原因

options(tinytex.tlmgr_update = FALSE) 是R包tinytex的会话级设置,但quarto::quarto_render()默认调用独立的Quarto CLI进程,不会继承当前R会话的选项,因此该设置无效。

有效解决方案

1. 调用quarto_render时传递命令行参数

直接通过args参数传递Quarto内置的禁用tlmgr更新选项:

quarto::quarto_render("my_document.qmd", args = c("--no-tlmgr-update"))

2. 在文档YAML或项目配置中全局设置

  • 单文档生效:在.qmd文件的YAML头部添加配置:
    ---
    title: "My Document"
    format:
      pdf:
        tlmgr-update: false
    ---
    
  • 整个项目生效:在项目根目录的_quarto.yml中添加全局配置:
    execute:
      tlmgr-update: false
    

RStudio Render按钮的适配

RStudio的Render按钮默认调用Quarto CLI,不会直接读取R会话的options()设置,但可以通过上述文档YAML或项目配置的方式,让Render按钮遵循禁用tlmgr更新的规则。

内容的提问来源于stack exchange,提问作者moremo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 06:16:04