I want to have an enumeration with text and formulas with a background color, but \colorbox
does not work, here's my code:
\documentclass{book}
\usepackage{xcolor}
\usepackage{shadethm}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{amssymb}
\usepackage{graphicx}
\definecolor{usethiscolorhere}{rgb}{0.86666,0.78431,0.78431}
\begin{document}
%\colorbox{usethiscolorhere}{
\begin{enumerate}
\item bla bla
\item bla bla
\item $\begin{aligned}[t]\lim _{x \rightarrow -\infty}F(x)=0 \end{aligned}$ and $\begin{aligned}[t]lim_{x \rightarrow \infty} F(x)=1\end{aligned}$
\end{enumerate}
%}
\end{document}
The color should be one of my self defined colors.
Best Answer
You need to avoid the indentation and also to take into account the padding of
\colorbox
:Note the two
%
characters for avoiding spurious spaces in the output and\limits
to get the subscript underneath "lim".