2

I create some slides using the xaringan package. But when I knit the file by hitting the RStudio "Knit" Button, only a white window appears.

Opening the generated html file with my browser shows the presentation as expected. Thus, I figured that the moon_reader from the package can't find remark.js. I also found out that one can download remark.js with xaringan::summon_remark().

Unfortunately, this does not work for me since I do not have internet access from within R due to security restrictions at my institution.

Is there any other workaround which makes it possible to use the moon_reader?

der_grund
  • 1,898
  • 20
  • 36

1 Answers1

2

xaringan::summon_remark() basically downloads a version of remark.js using R. You can certainly use other methods to download it, e.g., just save https://remarkjs.com/downloads/remark-latest.min.js to a local directory using your web browser, and point the chakra option of xaringan::moon_reader() to the local path of remark.js.

Other versions of remark.js can be found at https://github.com/gnab/remark/tree/gh-pages/downloads.

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
  • Thanks for the hint. It lead me to your great RMarkdown Guide: https://bookdown.org/yihui/rmarkdown/some-tips.html#working-offline. – der_grund Jan 11 '19 at 08:27
  • That's weird. It worked exactly once... any ideas what else could go wrong? – der_grund Jan 11 '19 at 08:44
  • I noticed today that it actually does work, it just renders really slow (like a minute or so). Might that be related to fonts which are not found? Does searching for them take very long if there is not internet connection? – der_grund Jan 18 '19 at 10:35