| 1 |
% \subsubsection{Theorem and theorem-like environments} |
| 2 |
% On the web, a theorem is emitted as a special |<div>|. |
| 3 |
% \begin{macrocode} |
| 4 |
%<*htXimera> |
| 5 |
\newcommand{\ConfigureTheoremEnv}[1]{% |
| 6 |
\renewenvironment{#1}[1][]{\refstepcounter{problem}% |
| 7 |
\ifthenelse{\equal{##1}{}}{}{% |
| 8 |
\HCode{<span class="theorem-like-title">}##1\HCode{</span>}% |
| 9 |
}}{} |
| 10 |
\ConfigureEnv{#1}{\stepcounter{identification}\ifvmode \IgnorePar\fi \EndP\HCode{<div class="theorem-like problem-environment #1" id="problem\arabic{identification}">}}{\HCode{</div>}\IgnoreIndent}{}{}% |
| 11 |
} |
| 12 |
%</htXimera> |
| 13 |
%<classXimera>\theoremstyle{definition} % No italic (because this makes also text in TikZ italic !!!) |
| 14 |
% \end{macrocode} |
| 15 |
|
| 16 |
% The key is to make sure that the theorem environments are defined in |
| 17 |
% a corresponding fashion on the web and on paper. |
| 18 |
|
| 19 |
% \DescribeEnv{theorem}{Theorem} |
| 20 |
% \begin{macrocode} |
| 21 |
%<classXimera> \newtheorem{theorem}{Theorem} |
| 22 |
%<htXimera> \ConfigureTheoremEnv{theorem} |
| 23 |
% \end{macrocode} |
| 24 |
|
| 25 |
% \DescribeEnv{algorithm}{Algorithm} |
| 26 |
% \begin{macrocode} |
| 27 |
%<classXimera> \newtheorem{algorithm}{Algorithm} |
| 28 |
%<htXimera> \ConfigureTheoremEnv{algorithm} |
| 29 |
% \end{macrocode} |
| 30 |
|
| 31 |
% \DescribeEnv{axiom}{Axiom} |
| 32 |
% \begin{macrocode} |
| 33 |
%<classXimera> \newtheorem{axiom}{Axiom} |
| 34 |
%<htXimera> \ConfigureTheoremEnv{axiom} |
| 35 |
% \end{macrocode} |
| 36 |
|
| 37 |
% \DescribeEnv{claim}{Claim} |
| 38 |
% \begin{macrocode} |
| 39 |
%<classXimera> \newtheorem{claim}{Claim} |
| 40 |
%<htXimera> \ConfigureTheoremEnv{claim} |
| 41 |
% \end{macrocode} |
| 42 |
|
| 43 |
% \DescribeEnv{conclusion}{Conclusion} |
| 44 |
% \begin{macrocode} |
| 45 |
%<classXimera> \newtheorem{conclusion}{Conclusion} |
| 46 |
%<htXimera> \ConfigureTheoremEnv{conclusion} |
| 47 |
% \end{macrocode} |
| 48 |
|
| 49 |
% \DescribeEnv{condition}{Condition} |
| 50 |
% \begin{macrocode} |
| 51 |
%<classXimera> \newtheorem{condition}{Condition} |
| 52 |
%<htXimera> \ConfigureTheoremEnv{condition} |
| 53 |
% \end{macrocode} |
| 54 |
|
| 55 |
% \DescribeEnv{conjecture}{Conjecture} |
| 56 |
% \begin{macrocode} |
| 57 |
%<classXimera> \newtheorem{conjecture}{Conjecture} |
| 58 |
%<htXimera> \ConfigureTheoremEnv{conjecture} |
| 59 |
% \end{macrocode} |
| 60 |
|
| 61 |
% \DescribeEnv{corollary}{Corollary} |
| 62 |
% \begin{macrocode} |
| 63 |
%<classXimera> \newtheorem{corollary}{Corollary} |
| 64 |
%<htXimera> \ConfigureTheoremEnv{corollary} |
| 65 |
% \end{macrocode} |
| 66 |
|
| 67 |
% \DescribeEnv{criterion}{Criterion} |
| 68 |
% \begin{macrocode} |
| 69 |
%<classXimera> \newtheorem{criterion}{Criterion} |
| 70 |
%<htXimera> \ConfigureTheoremEnv{criterion} |
| 71 |
% \end{macrocode} |
| 72 |
|
| 73 |
% \DescribeEnv{definition}{Definition} |
| 74 |
% \begin{macrocode} |
| 75 |
%<classXimera> \newtheorem{definition}{Definition} |
| 76 |
%<htXimera> \ConfigureTheoremEnv{definition} |
| 77 |
% \end{macrocode} |
| 78 |
|
| 79 |
% \DescribeEnv{example}{Example} |
| 80 |
% \begin{macrocode} |
| 81 |
%<classXimera> \newtheorem{example}{Example} |
| 82 |
%<htXimera> \ConfigureTheoremEnv{example} |
| 83 |
% \end{macrocode} |
| 84 |
|
| 85 |
% \DescribeEnv{explanation}{Explanation} |
| 86 |
% \begin{macrocode} |
| 87 |
%<classXimera> \newtheorem*{explanation}{Explanation} |
| 88 |
%<htXimera> \ConfigureTheoremEnv{explanation} |
| 89 |
% \end{macrocode} |
| 90 |
|
| 91 |
% \DescribeEnv{fact}{Fact} |
| 92 |
% \begin{macrocode} |
| 93 |
%<classXimera> \newtheorem{fact}{Fact} |
| 94 |
%<htXimera> \ConfigureTheoremEnv{fact} |
| 95 |
% \end{macrocode} |
| 96 |
|
| 97 |
% \DescribeEnv{lemma}{Lemma} |
| 98 |
% \begin{macrocode} |
| 99 |
%<classXimera> \newtheorem{lemma}{Lemma} |
| 100 |
%<htXimera> \ConfigureTheoremEnv{lemma} |
| 101 |
% \end{macrocode} |
| 102 |
|
| 103 |
% \DescribeEnv{formula}{Formula} |
| 104 |
% \begin{macrocode} |
| 105 |
%<classXimera> \newtheorem{formula}{Formula} |
| 106 |
%<htXimera> \ConfigureTheoremEnv{formula} |
| 107 |
% \end{macrocode} |
| 108 |
|
| 109 |
% \DescribeEnv{idea}{Idea} |
| 110 |
% \begin{macrocode} |
| 111 |
%<classXimera> \newtheorem{idea}{Idea} |
| 112 |
%<htXimera> \ConfigureTheoremEnv{idea} |
| 113 |
% \end{macrocode} |
| 114 |
|
| 115 |
% \DescribeEnv{notation}{Notation} |
| 116 |
% \begin{macrocode} |
| 117 |
%<classXimera> \newtheorem{notation}{Notation} |
| 118 |
%<htXimera> \ConfigureTheoremEnv{notation} |
| 119 |
% \end{macrocode} |
| 120 |
|
| 121 |
% \DescribeEnv{model}{Model} |
| 122 |
% \begin{macrocode} |
| 123 |
%<classXimera> \newtheorem{model}{Model} |
| 124 |
%<htXimera> \ConfigureTheoremEnv{model} |
| 125 |
% \end{macrocode} |
| 126 |
|
| 127 |
% \DescribeEnv{observation}{Observation} |
| 128 |
% \begin{macrocode} |
| 129 |
%<classXimera> \newtheorem{observation}{Observation} |
| 130 |
%<htXimera> \ConfigureTheoremEnv{observation} |
| 131 |
% \end{macrocode} |
| 132 |
|
| 133 |
% \DescribeEnv{proposition}{Proposition} |
| 134 |
% \begin{macrocode} |
| 135 |
%<classXimera> \newtheorem{proposition}{Proposition} |
| 136 |
%<htXimera> \ConfigureTheoremEnv{proposition} |
| 137 |
% \end{macrocode} |
| 138 |
|
| 139 |
% \DescribeEnv{paradox}{Paradox} |
| 140 |
% \begin{macrocode} |
| 141 |
%<classXimera> \newtheorem{paradox}{Paradox} |
| 142 |
%<htXimera> \ConfigureTheoremEnv{paradox} |
| 143 |
% \end{macrocode} |
| 144 |
|
| 145 |
% \DescribeEnv{procedure}{Procedure} |
| 146 |
% \begin{macrocode} |
| 147 |
%<classXimera> \newtheorem{procedure}{Procedure} |
| 148 |
%<htXimera> \ConfigureTheoremEnv{procedure} |
| 149 |
% \end{macrocode} |
| 150 |
|
| 151 |
% \DescribeEnv{remark}{Remark} |
| 152 |
% \begin{macrocode} |
| 153 |
%<classXimera> \newtheorem{remark}{Remark} |
| 154 |
%<htXimera> \ConfigureTheoremEnv{remark} |
| 155 |
% \end{macrocode} |
| 156 |
|
| 157 |
% \DescribeEnv{summary}{Summary} |
| 158 |
% \begin{macrocode} |
| 159 |
%<classXimera> \newtheorem{summary}{Summary} |
| 160 |
%<htXimera> \ConfigureTheoremEnv{summary} |
| 161 |
% \end{macrocode} |
| 162 |
|
| 163 |
% \DescribeEnv{template}{Template} |
| 164 |
% \begin{macrocode} |
| 165 |
%<classXimera> \newtheorem{template}{Template} |
| 166 |
%<htXimera> \ConfigureTheoremEnv{template} |
| 167 |
% \end{macrocode} |
| 168 |
|
| 169 |
% \DescribeEnv{warning}{Warning} |
| 170 |
% \begin{macrocode} |
| 171 |
%<classXimera> \newtheorem{warning}{Warning} |
| 172 |
%<htXimera> \ConfigureTheoremEnv{warning} |
| 173 |
% \end{macrocode} |
| 174 |
|