I am not quite sure whether this is a bug. It seems that when you set seal: false and the first slide becomes your first slide, if there is a --- before this slide the instant preview won't work.
Here is an example:
https://github.com/rstudio-education/arm-workshop-rsc2019/blob/master/static/slides/xaringan.Rmd#L38
When this line is excluded, then the preview works.
Quick reprex:
No good (with layout: true and --- before first slide):
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
seal: false
---
layout: true
---
class: center, middle
# xaringan
### /ʃaː.'riŋ.ɡan/
---
class: inverse, center, middle
# Get Started
If we remove --- between layout and class then it works again.
Should be fixed now. Thanks for the report! Please test the development version via
remotes::install_github('yihui/xaringan')
Cool! Thanks for taking a look into that!
Just tested it out and it is working great! Thanks for that!
I might have found another bug by mistake. I wanted to use incremental slides inside a .pull-left[] and .pull-right[] - which btw I am not sure if it is possible (at least I couldn't get it to work), but anyways... The thing is that if I have a -- inside .pull-left[] or .pull-right[] the instant preview doesn't work anymore.
I am also not sure if this is a bug. But I thought it would be worth it to mention (please, let me know if I should open a new issue).
Reprex:
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
seal: false
---
# Hello World
.pull-left[
Install the **xaringan** package from [Github](https://github.com/yihui/xaringan)
]
--
.pull-right[
You are recommended to use the [RStudio IDE](https://www.rstudio.com/products/rstudio/), but you do not have to.
- Create a new R Markdown document from the menu `File -> New File -> R Markdown -> From Template -> Ninja Presentation`;<sup>1</sup>
--
- Click the `Knit` button to compile it;
]
Note the -- between - Create... and - Click.... As soon as you remove it, the instant preview works again.
> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 later_0.8.0 compiler_3.5.3 prettyunits_1.0.2 remotes_2.0.2 tools_3.5.3
[7] testthat_2.0.1 digest_0.6.18 packrat_0.5.0 pkgbuild_1.0.2 pkgload_1.0.2 jsonlite_1.6
[13] memoise_1.1.0 evaluate_0.13 rlang_0.3.1 cli_1.0.1 rstudioapi_0.9.0 yaml_2.2.0
[19] xfun_0.5.2 withr_2.1.2 stringr_1.4.0 knitr_1.22 desc_1.2.0 htmlwidgets_1.3
[25] fs_1.2.6 devtools_2.0.1 rprojroot_1.3-2 DT_0.5 glue_1.3.1 R6_2.4.0
[31] processx_3.3.0 rmarkdown_1.12 xaringan_0.9.2 sessioninfo_1.1.1 callr_3.1.1 magrittr_1.5
[37] servr_0.13.1 promises_1.0.1 backports_1.1.3 ps_1.3.0 htmltools_0.3.6 usethis_1.4.0
[43] assertthat_0.2.0 httpuv_1.4.5.1 stringi_1.4.3 crayon_1.3.4
It is not a bug. You cannot break .anything[ ] in the middle using --. Or in general, -- shouldn't be used to break an element into two syntactically incomplete elements. You can break lists, paragraphs, and quotes, etc., but neither .foo[bla bla or bla bla] is syntactically complete, so
.foo[bla bla
--
bla bla]
won't work.
Oooh, ok! Thanks for the quick response!