Latex shell-escape options in YAML header don't use

前端 未结 1 557
难免孤独
难免孤独 2021-01-27 04:41

I\'m writing a report on Rmarkdovn but when you try to compile - pandoc_args options ignored when compile pdf.

I find this question: Is it possible to include svg image

1条回答
  •  遥遥无期
    2021-01-27 05:18

    R Markdown documents are compiled to PDF via tinytex::latexmk(). To enable the -shell-escape option for your LaTeX engine, you may set the global option tinytex.engine_args, e.g., add this code chunk to your document:

    ```{r, include=FALSE}
    options(tinytex.engine_args = '-shell-escape')
    ```
    

    See the help page ?tinytex::latexmk for more information.

    The LaTeX engine is called by tinytex::latexmk() instead of Pandoc, so the Pandoc argument --pdf-engine-opt won't work.

    0 讨论(0)
提交回复
热议问题