0

I am coming to RStudio from the CMD prompt and the pdflatex command. From my understanding, RStudio runs behind the scenes:

  • pdflatex
  • bibtex (if you have natbib going on)
  • pdflatex

I would like to be able to pass some parameters like "-quiet" or "-interaction=nonstopmode"

enter image description here

From the command line, these are possible.

How do I add custom flags to the RStudio implementation of pdflatex?

mshaffer
  • 959
  • 1
  • 9
  • 19

1 Answers1

1

You don't say, but I'll assume you're working in R Markdown. For R Markdown, RStudio gets pandoc to call pdflatex. From the Pandoc manual, you want to set the Pandoc option --pdf-engine-opt: see https://pandoc.org/MANUAL.html#option--pdf-engine-opt. To do this in an RMarkdown document, you put this in the header:

output:
  pdf_document:
    pandoc_args:  "--pdf-engine-opt=-quiet"

If you want multiple arguments I think you can just include them in the string, but you might need to do it like this:

output:
  pdf_document:
    pandoc_args:  ["--pdf-engine-opt=-quiet",
                   "--pdf-engine-opt=-interaction=nonstopmode"]

You'll have to try it to see which works for you; both are accepted, but I couldn't tell if they were both being acted on.

user2554330
  • 37,248
  • 4
  • 43
  • 90