PDF not displayed after knitting Rmd file

When I knit an .Rmd file it does not automatically display the final pdf file in a new window or in Viewer Pane. The PDF file is generated and can be opened fine if double clicked, but I want to be able to see it within RStudio. If I knit the same file to HTML it does show up in a new window or in Viewer Pane (tried with both settings.)

Any thoughts? Thank you.

SessionInfo:

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.0.2  htmltools_0.5.0 tools_4.0.2     yaml_2.2.1      rmarkdown_2.4   knitr_1.30      xfun_0.18      
 [8] digest_0.6.25   rlang_0.4.7     evaluate_0.14

Tested with this .Rmd:

---
title: "Sample Document"
output: pdf_document
---

This is some text.

Try installing tinytex.

Thanks williaml. It's already installed.

Installed:

latexpdf 0.1.6
pdftools 2.3.1
tinytex 0.26

1 Like

Found the issue:

Global Options > Sweave > Preview PDF after compile using was set to No viewer. Selecting Rstudio Viewer solved the problem.

7 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.