Home > Blockchain >  Adding colorful background to equation by acting directly on MathJax without CSS
Adding colorful background to equation by acting directly on MathJax without CSS

Time:12-09

I am trying to add a colorful background to an equation. I can accomplish that by using CSS, but now I am wondering where it is possible to do that directly in the script calling MathJax.

Please, find below a rmarkdown example.

---
title: "Untitled"
output: html_document
---

Some text:

$$Y = \beta_0   \beta_ 1 X_1   \ldots   \beta_n X_n.$$

CodePudding user response:

It is easy:

$$\require{color}\colorbox{magenta}{y = (sin)x}$$

enter image description here

  • Related