Home > Net >  Problem with displaying equation with a colorful background with Xaringan
Problem with displaying equation with a colorful background with Xaringan

Time:01-06

When using Bookdown (HTML output), the following works perfectly:

$$\require{color}\displaystyle{\colorbox{#FFD1DC}{
$Y = \beta_0   \beta_1 X_1   \ldots   \beta_n X_n.$}}$$

However, with Xaringan, the equation is not even rendered.

Could you please help me?

CodePudding user response:

Try this:

$$\require{color}\displaystyle 
\colorbox{#FFD1DC}{$Y = \beta_0   \beta_1 X_1   \ldots   \beta_n X_n$}$$

or same:

$$\require{color}\displaystyle\colorbox{#FFD1DC}{$Y = \beta_0   \beta_1 X_1   \ldots   \beta_n X_n$}$$

To the future: Be careful with whitespaces. Xarigan is so overnice with them.

enter image description here

  •  Tags:  
  • Related