Make MathJax colorful!

Taken from a tutorial by Hartmut Ring.

Den grün unterlegten Term können wir so berechnen: $3$ Briefe $(i, j, k)$ aus $n$ Briefen auswählen (und in die richtigen Umschläge stecken), die $n - 3$ übrigen Briefe beliebig verteilen:

Without bbox you get no contiguous formula:

$\binom{n}{3}$ $(n-3)!$  $=$  $\frac{n!}{3! (n-3)!}$ $(n-3)!$  $=$  $\frac{n!}{3!}$  

With bbox:

$$ \bbox[#c0e0ff,2pt]{\binom{n}{3}} \; \bbox[#ffe0a0,2pt]{(n-3)!} \, = \, \bbox[#c0e0ff,2pt]{\frac{n!}{3! (n-3)!}} \, \bbox[#ffe0a0,2pt]{(n-3)!} \, = \, \bbox[#c0ffc0,2pt]{\frac{n!}{3!}} $$
$$ \def\pink{\bbox[#ffe0e0,2pt]} \def\blue{\bbox[#c0e0ff,2pt]} \def\green{\bbox[#d0ffd0,2pt]} \def\gray{\bbox[#e0e0e0,2pt]} \def\yellow{\bbox[#ffffa0,2pt]} \gray{ \pink{2} + \frac{1}{ \displaystyle \blue{1} + \frac{1}{\displaystyle \green{3} + \frac{1}{\yellow{5}}}}} \: = 2 + \frac{1}{\frac{21}{16}} = 2 + \frac{16}{21} = \frac{58}{21} $$ $$ x = \green{\lfloor x \rfloor} + \yellow{(x - \lfloor x \rfloor)} = \lfloor x \rfloor + \frac{1}{\pink{\frac{1}{x - \lfloor x \rfloor}}} $$
$$ \eqalign{ 4,218656 & = \green 4 + \yellow{0,218656} \approx 4 + \frac{1}{4.5733998} \cr & = \green 4 + \frac{1}{{\green 4 + \yellow{0.5733998}}} \approx 4 + \frac{1}{{4 + \frac{1}{1.7439838658}}} \cr & = \green 4 + {\frac{1}{\green 4 + {\frac{1}{\green 1 + \yellow{0.7439838658}}}}} \approx 4 + {\frac{1}{4 + {\frac{1}{1 + \frac{1}{1.3441151}}}}} } $$

 


Similar to an example of Herbert Voß in "Farbige Mathematik":

$$ \eqalign{ \color{blue} {y} & \color{blue}{= 2x^2 -3x +5} \cr & = 2\left(\blue{x^2-\frac{3}{2}\,x } + \underbrace { \green{\left(\frac{3}{4}\right)^2 - \left(\frac{3}{4}\right)^2}}_{=\,0} + \yellow{ \frac{5}{2} } \right) \cr & = 2\left(\blue{ x^2-\frac{3}{2}\,x + \left(\frac{3}{4}\right)^2 } \yellow{ - \left(\frac{3}{4}\right)^2 + \frac{5}{2} } \right) \cr & = 2\left(\qquad \blue{ \left( x - \frac{3}{4} \right) ^2 } \quad + \quad \yellow{ \frac{31}{16}} \qquad \right)} $$ $$ \hspace{-55 pt} \color{blue}{\implies \quad y - \frac{31}{8} \ = \ 2\left(x -\ \frac{3}{4} \right)^2 } $$