title: Confining colorful background to the area of an equation in rmarkdown
body: <p>I would like to add a colorful background to equations. I have tried the code below, but, unfortunately, the colorful background expands to the margins instead of being confined to the equation. Could someone please help me?</p>
  <pre><code>---
  title: &quot;Untitled&quot;
  output: html_document
  ---
  
  Some text
  
  &lt;div style=&quot;background-color: rgb(255,255,153);&quot;&gt;
  $$Y = \beta_0 + \beta_ 1 X_1 + \ldots + \beta_n X_n.$$
  &lt;/div&gt;
  </code></pre>