The framed package does not work with TEX4ht. So we are not using it by redefining the ColoredBackground environment.
The basic idea is to wrap colored environments with a
<div class="clsENVIRONMENT"> ... </div>
|
pair and write out a line
div.clsENVIRONMNET{background-color:COLOR;}
|
to the CSS (cascaded style sheet) myalps.css.
In order to avoid having several identical CSS entries in myalps.css, we redefine the command \backgroundcolor... after it has been used once.
The addition of
\ifvmode\IgnorePar\fi\EndP
|
has been suggested by Eitan Gurari in order to avoid wrongly closed </p> in XHTML generation.