% \subsubsection{Theorem and theorem-like environments}
% On the web, a theorem is emitted as a special |<div>|.
%    \begin{macrocode}
%<*htXimera>
\newcommand{\ConfigureTheoremEnv}[1]{%
\renewenvironment{#1}[1][]{\refstepcounter{problem}%
\ifthenelse{\equal{##1}{}}{}{%
  \HCode{<span class="theorem-like-title">}##1\HCode{</span>}%
}}{}
\ConfigureEnv{#1}{\stepcounter{identification}\ifvmode \IgnorePar\fi \EndP\HCode{<div class="theorem-like problem-environment #1" id="problem\arabic{identification}">}}{\HCode{</div>}\IgnoreIndent}{}{}%
}
%</htXimera>
%<classXimera>\theoremstyle{definition} % No italic (because this makes also text in TikZ italic !!!)
%    \end{macrocode}

% The key is to make sure that the theorem environments are defined in
% a corresponding fashion on the web and on paper.

% \DescribeEnv{theorem}{Theorem}
%    \begin{macrocode}
%<classXimera>      \newtheorem{theorem}{Theorem}
%<htXimera>      \ConfigureTheoremEnv{theorem}
%    \end{macrocode}

% \DescribeEnv{algorithm}{Algorithm}
%    \begin{macrocode}
%<classXimera>      \newtheorem{algorithm}{Algorithm}
%<htXimera>      \ConfigureTheoremEnv{algorithm}
%    \end{macrocode}

% \DescribeEnv{axiom}{Axiom}
%    \begin{macrocode}
%<classXimera>      \newtheorem{axiom}{Axiom}
%<htXimera>      \ConfigureTheoremEnv{axiom}
%    \end{macrocode}

% \DescribeEnv{claim}{Claim}
%    \begin{macrocode}
%<classXimera>      \newtheorem{claim}{Claim}
%<htXimera>      \ConfigureTheoremEnv{claim}
%    \end{macrocode}

% \DescribeEnv{conclusion}{Conclusion}
%    \begin{macrocode}
%<classXimera>      \newtheorem{conclusion}{Conclusion}
%<htXimera>      \ConfigureTheoremEnv{conclusion}
%    \end{macrocode}

% \DescribeEnv{condition}{Condition}
%    \begin{macrocode}
%<classXimera>      \newtheorem{condition}{Condition}
%<htXimera>      \ConfigureTheoremEnv{condition}
%    \end{macrocode}

% \DescribeEnv{conjecture}{Conjecture}
%    \begin{macrocode}
%<classXimera>      \newtheorem{conjecture}{Conjecture}
%<htXimera>      \ConfigureTheoremEnv{conjecture}
%    \end{macrocode}

% \DescribeEnv{corollary}{Corollary}
%    \begin{macrocode}
%<classXimera>      \newtheorem{corollary}{Corollary}
%<htXimera>      \ConfigureTheoremEnv{corollary}
%    \end{macrocode}

% \DescribeEnv{criterion}{Criterion}
%    \begin{macrocode}
%<classXimera>      \newtheorem{criterion}{Criterion}
%<htXimera>      \ConfigureTheoremEnv{criterion}
%    \end{macrocode}

% \DescribeEnv{definition}{Definition}
%    \begin{macrocode}
%<classXimera>      \newtheorem{definition}{Definition}
%<htXimera>      \ConfigureTheoremEnv{definition}
%    \end{macrocode}

% \DescribeEnv{example}{Example}
%    \begin{macrocode}
%<classXimera>      \newtheorem{example}{Example}
%<htXimera>      \ConfigureTheoremEnv{example}
%    \end{macrocode}

% \DescribeEnv{explanation}{Explanation}
%    \begin{macrocode}
%<classXimera>      \newtheorem*{explanation}{Explanation}
%<htXimera>      \ConfigureTheoremEnv{explanation}
%    \end{macrocode}

% \DescribeEnv{fact}{Fact}
%    \begin{macrocode}
%<classXimera>      \newtheorem{fact}{Fact}
%<htXimera>      \ConfigureTheoremEnv{fact}
%    \end{macrocode}

% \DescribeEnv{lemma}{Lemma}
%    \begin{macrocode}
%<classXimera>      \newtheorem{lemma}{Lemma}
%<htXimera>      \ConfigureTheoremEnv{lemma}
%    \end{macrocode}

% \DescribeEnv{formula}{Formula}
%    \begin{macrocode}
%<classXimera>      \newtheorem{formula}{Formula}
%<htXimera>      \ConfigureTheoremEnv{formula}
%    \end{macrocode}

% \DescribeEnv{idea}{Idea}
%    \begin{macrocode}
%<classXimera>      \newtheorem{idea}{Idea}
%<htXimera>      \ConfigureTheoremEnv{idea}
%    \end{macrocode}

% \DescribeEnv{notation}{Notation}
%    \begin{macrocode}
%<classXimera>      \newtheorem{notation}{Notation}
%<htXimera>      \ConfigureTheoremEnv{notation}
%    \end{macrocode}

% \DescribeEnv{model}{Model}
%    \begin{macrocode}
%<classXimera>      \newtheorem{model}{Model}
%<htXimera>      \ConfigureTheoremEnv{model}
%    \end{macrocode}

% \DescribeEnv{observation}{Observation}
%    \begin{macrocode}
%<classXimera>      \newtheorem{observation}{Observation}
%<htXimera>      \ConfigureTheoremEnv{observation}
%    \end{macrocode}

% \DescribeEnv{proposition}{Proposition}
%    \begin{macrocode}
%<classXimera>      \newtheorem{proposition}{Proposition}
%<htXimera>      \ConfigureTheoremEnv{proposition}
%    \end{macrocode}

% \DescribeEnv{paradox}{Paradox}
%    \begin{macrocode}
%<classXimera>      \newtheorem{paradox}{Paradox}
%<htXimera>      \ConfigureTheoremEnv{paradox}
%    \end{macrocode}

% \DescribeEnv{procedure}{Procedure}
%    \begin{macrocode}
%<classXimera>      \newtheorem{procedure}{Procedure}
%<htXimera>      \ConfigureTheoremEnv{procedure}
%    \end{macrocode}

% \DescribeEnv{remark}{Remark}
%    \begin{macrocode}
%<classXimera>      \newtheorem{remark}{Remark}
%<htXimera>      \ConfigureTheoremEnv{remark}
%    \end{macrocode}

% \DescribeEnv{summary}{Summary}
%    \begin{macrocode}
%<classXimera>      \newtheorem{summary}{Summary}
%<htXimera>      \ConfigureTheoremEnv{summary}
%    \end{macrocode}

% \DescribeEnv{template}{Template}
%    \begin{macrocode}
%<classXimera>      \newtheorem{template}{Template}
%<htXimera>      \ConfigureTheoremEnv{template}
%    \end{macrocode}

% \DescribeEnv{warning}{Warning}
%    \begin{macrocode}
%<classXimera>      \newtheorem{warning}{Warning}
%<htXimera>      \ConfigureTheoremEnv{warning}
%    \end{macrocode}

