I've been using RStudio/knitr to create PDFs for many months now, and I've just encountered some strange behavior today.
The first time I knit a PDF, the PDF preview window will open as usual. If I then close it, make more changes, and then re-knit it, the preview window won't open again. The pdf IS being recreated, I can open the file in a separate application and see the new changes included. It's just that the preview window in rstudio isn't opening. If I completely close and restart RStudio, then once again I'll see the preview window the first time I knit but not after that.
Trouble-shooting I've done so far:
- I've gone up to the Window menu to make sure that the preview window isn't opening in some weird location/size that I'm not seeing, but it also shows that the preview window is not open.
- I've double-checked the setting for "Preview in Window", it is correctly set.
- I updated RStudio to the latest version (1.1.463), still happening.
- I've opened old rmarkdown files from back when I didn't have this issue, and the issue persists with them too now, so it's not an issue with the new file I'm trying to knit.
The only thing I can think of is that I did upgrade my Mac to Mojave a couple weeks ago, and this is the first time I've used rstudio since (I'm a university student, upgraded my Mac over the holiday break between semesters, just using it for the first time this semester). I've searched for issues with Mojave and rstudio, and while there do seem to be some issues, I haven't seen anyone mention this. I did find one person who posted the same issue back in 2017 on stackoverflow (and here I think) but there were no responses on those posts.
Any ideas?
Thanks in advance.