Knitr wont compile PDF: “Error in tools::file_path_as_absolute(output_file)”

前端 未结 5 386
粉色の甜心
粉色の甜心 2020-12-01 08:15

I have created a report in markdown and use the function render() to compile the code into a PDF. It worked fine a month ago, but when I run the code now, it gi

5条回答
  •  独厮守ぢ
    2020-12-01 08:16

    A better solution appears to be to use tinytex.

    install.packages('tinytex')
    tinytex::install_tinytex()
    

    If you have to use MikTex and have it installed already, open the MikTex console and change the missing package setting to:

    Always install missing packages on the fly
    

    If you have not installed MikTex yet then on installation make sure to choose:

    Install missing packages: Yes
    

    When I originally installed I chose Ask me first and it would fail. I have tried both changing the settings of MikTex, as well as uninstalled it and just settled for tinytex which was a bit more lightweight for my needs.

    The original thread with solution near the bottom: https://github.com/rstudio/rmarkdown/issues/1285

提交回复
热议问题