I have a long .tex document and I want to change the background color of the parts I have already checked for typos to a light green. I am looking for an easy command that can be used like
\HIGHLIGHT{
<here I want to put a part of my tex file that contains different environments like theorems, figures...>
}
But the \hl{}
command cannot contain other environments, the following example does not work:
\documentclass[10pt]{article}
\usepackage[english]{babel}
\usepackage{amssymb,amsmath,amsthm,amsfonts}
\usepackage{xcolor,soul}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{Introduction}
\hl{
\begin{theorem}
A theorem.
\end{theorem}
}
\end{document}
Do you have any suggestions which command could be used here (the typesetting shall not be changed, only the color)?
tcolorbox
and using it's theorem features, as such you can easily change the background colourtcolorbox
does not set the boxes at the top of a new page.\hl{...}
statements you would have to do that anyway