I'm looking for a possibility to visually highlight entire portions of a document. It could be a paragraph or entire pages. Ideally by changing the background color, but it could also be a colored bar along the margin.
It's important that the portion may contain anything: figures, tables, listings (!), etc. If there are floats contained, it's not important that they stay inside that environment, but they should also be highlighted somehow. So it should look something like this:
\begin{myhighlighter}{red}
foo
\url{test.com/a%20path.html}
\includegraphics{image}
\begin{lstlisting}
!@#$%^&*(
\end{lstlisting}
bar
\end{myhighlighter}
Aesthetics are secondary. Is that possible?
Edit: I'm using LuaLaTeX
tcolorbox
package.tcolorbox
does not work with listings or URLs that contain a percent sign. Same with thebcolorbox
solution from tex.stackexchange.com/questions/443156