rgheck wrote:
> Does this need to be included here, or in every theorem environment? If
> in every one, then it probably ought to go in a more global sort of
> Preamble declaration. Actually, I guess the other ones depend upon that
> one, so that would be OK. But it's kind of fragile that way. So...
It needs to be included in Theorem and Theorem*. The other ones load one of
these automatically (DependsOn flag, which needs to be added to some styles,
though).
> At present, each new global Preamble over-writes the previous one. This
> is very counter-intuitive, so I'd propose this be changed, so that
> Preamble sections ADD TO the existing preamble stuff, rather than
> totally over-writing it. If necessary, we could also have a
> PreambleReset declaration.
>
> Thoughts?
This will break many layout files that deliberatly overwrite Preamble
definitions.
If needed, I'd rather add an AddPreamble flag (but DependsOn would probably be
enough in most cases).
However, for the given problem, Requires is the better solution for trunk (see
patch amsthm.diff). For branch, I'd propose patch amsthm-15.diff.
Jürgen
Index: lib/layouts/theorems.inc
===
--- lib/layouts/theorems.inc (Revision 23556)
+++ lib/layouts/theorems.inc (Arbeitskopie)
@@ -51,12 +51,13 @@
Preamble
\newtheorem{thm}{Theorem}
EndPreamble
+ Requires amsthm
End
Style Corollary
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName cor
LabelString "Corollary \thetheorem."
Preamble
@@ -67,7 +68,7 @@
Style Lemma
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName lem
LabelString "Lemma \thetheorem."
Preamble
@@ -78,7 +79,7 @@
Style Proposition
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName prop
LabelString "Proposition \thetheorem."
Preamble
@@ -89,7 +90,7 @@
Style Conjecture
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName conjecture
LabelString "Conjecture \thetheorem."
Preamble
@@ -100,7 +101,7 @@
Style Fact
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName fact
LabelString "Fact \thetheorem."
Preamble
@@ -111,7 +112,7 @@
Style Definition
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName defn
LabelString "Definition \thetheorem."
Font
@@ -133,9 +134,10 @@
LatexName example
LabelString "Example \thetheorem."
Preamble
- \theoremstyle{definition}
+ \theoremstyle{definition}
\newtheorem{example}[thm]{Example}
EndPreamble
+ Requires amsthm
End
@@ -147,6 +149,7 @@
\theoremstyle{definition}
\newtheorem{problem}[thm]{Problem}
EndPreamble
+ Requires amsthm
End
@@ -158,12 +161,13 @@
\theoremstyle{definition}
\newtheorem{xca}[thm]{Exercise}
EndPreamble
+ Requires amsthm
End
Style Remark
CopyStyle Theorem
- DependsOn Theorem
+ DependsOn Theorem
LatexName rem
LabelString "Remark \thetheorem."
Font
@@ -189,6 +193,7 @@
\theoremstyle{remark}
\newtheorem{claim}[thm]{Claim}
EndPreamble
+ Requires amsthm
End
Index: lib/layouts/theorems-starred.inc
===
--- lib/layouts/theorems-starred.inc (Revision 23556)
+++ lib/layouts/theorems-starred.inc (Arbeitskopie)
@@ -50,6 +50,7 @@
\theoremstyle{plain}
\newtheorem*{thm*}{Theorem}
EndPreamble
+ Requires amsthm
End
@@ -61,6 +62,7 @@
\theoremstyle{plain}
\newtheorem*{cor*}{Corollary}
EndPreamble
+ Requires amsthm
End
@@ -72,6 +74,7 @@
\theoremstyle{plain}
\newtheorem*{lem*}{Lemma}
EndPreamble
+ Requires amsthm
End
@@ -83,6 +86,7 @@
\theoremstyle{plain}
\newtheorem*{prop*}{Proposition}
EndPreamble
+ Requires amsthm
End
@@ -94,6 +98,7 @@
\theoremstyle{plain}
\newtheorem*{conjecture*}{Conjecture}
EndPreamble
+ Requires amsthm
End
@@ -105,6 +110,7 @@
\theoremstyle{plain}
\newtheorem*{fact*}{Fact}
EndPreamble
+ Requires amsthm
End
@@ -124,6 +130,7 @@
\theoremstyle{definition}
\newtheorem*{defn*}{Definition}
EndPreamble
+ Requires amsthm
End
@@ -135,6 +142,7 @@
\theoremstyle{definition}
\newtheorem*{example*}{Example}
EndPreamble
+ Requires amsthm
End
@@ -146,6 +154,7 @@
\theoremstyle{definition}
\newtheorem*{problem*}{Problem}
EndPreamble
+ Requires amsthm
End
@@ -157,6