---
当我在演示文稿的开头保存 xaringan 幻灯片时,必须先将其删除,然后xaringan::inf_mr()
才能刷新查看器面板并更新更改。以下示例应该有助于创建这种情况:
(1) 创建 .Rmd 文件...
---
title: "Presentation Ninja"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
layout: true
background-image: url(https://github.com/yihui/xaringan/releases/download/v0.0.2/karl-moustache.jpg)
background-position: 91% 94%
background-size: 185px
<!-- Must have this break below -->
---
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```
# Test slide
Testing
---
# Test slide 2
Testing
---
# Test slide 3
Testing
(2) 现在我运行 Rmd 文件xaringan::inf_mr()
...当我这样做时,除非我现在评论/删除,而不保存,否则查看器不会刷新---
:
---
title: "Presentation Ninja"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
layout: true
background-image: url(https://github.com/yihui/xaringan/releases/download/v0.0.2/karl-moustache.jpg)
background-position: 91% 94%
background-size: 185px
<!-- Commented Out Now -->
<!-- --- -->
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
```
# Test slide
Testing
---
# Test slide 2
Testing
---
# Test slide 3
Testing
现在查看器将刷新。但是,每次我必须保存 Rmd 文件时,如果我想让查看器工作,我必须取消注释/重新注释这个---
. 我一定遗漏了一些非常基本的东西,但我不相信其他人已经报告过这个问题。
以下是有关我的系统的一些其他详细信息:
R.Version()
$`platform`
[1] "x86_64-w64-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$language
[1] "R"
$version.string
[1] "R version 3.5.1 (2018-07-02)"
$nickname
[1] "Feather Spray"
-
rstudioapi::versionInfo()
$`mode`
[1] "desktop"
$version
[1] ‘1.2.1237’
我的 xaringan 版本是0.8.15。
如果需要更清楚,请告诉我。
谢谢!
编辑
我将以下代码添加到 .Rmd 文档(基于此 wiki),这应该更好地说明所面临的问题:
layout: true
background-image: url(https://github.com/yihui/xaringan/releases/download/v0.0.2/karl-moustache.jpg)
background-position: 91% 94%
background-size: 185px