Search code examples
r-markdownxaringan

Incremental does not work with $$ in xaringan


One of my xaringan slide has the following code, but incremental does not work properly with $$ equation $$. Wondering what do I miss here.


# Multiple regression


#### It is only when: 

$$y=\beta_0+\beta_1 x + u\;\; \text{with}\;\; x\perp u$$

-- 

#### Very strong with $non\text{-}experimental$ data. 

This generates the following:

enter image description here


Solution

  • Incremental slide is not working in your case, that's because you have used a space after the two dash sign --. It's not related to $$ sign.

    Remove any space after -- sign, then incremental slide will work.


    This is actually a common error people face while working with xaringan incremental slides. See this related answer on SO and this appreciation post from Yihui Xie (author of xaringan) about that answer, Yue Jiang: A Ninja with Sharingan