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 +166,7 @@ \theoremstyle{definition} \newtheorem*{xca*}{Exercise} EndPreamble + Requires amsthm End @@ -176,6 +186,7 @@ \theoremstyle{remark} \newtheorem*{rem*}{Remark} EndPreamble + Requires amsthm End @@ -187,5 +198,6 @@ \theoremstyle{remark} \newtheorem*{claim*}{Claim} EndPreamble + Requires amsthm End Index: lib/layouts/theorems-ams.inc =================================================================== --- lib/layouts/theorems-ams.inc (Revision 23556) +++ lib/layouts/theorems-ams.inc (Arbeitskopie) @@ -49,16 +49,16 @@ Series Bold EndFont Preamble - \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem} EndPreamble + Requires amsthm End Style Corollary CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName cor LabelString "Corollary \thetheorem." Preamble @@ -70,7 +70,7 @@ Style Lemma CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName lem LabelString "Lemma \thetheorem." Preamble @@ -82,7 +82,7 @@ Style Proposition CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName prop LabelString "Proposition \thetheorem." Preamble @@ -94,7 +94,7 @@ Style Conjecture CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName conjecture LabelString "Conjecture \thetheorem." Preamble @@ -106,7 +106,7 @@ Style Fact CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName fact LabelString "Fact \thetheorem." Preamble @@ -118,7 +118,7 @@ Style Definition CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName defn LabelString "Definition \thetheorem." Font @@ -143,6 +143,7 @@ \theoremstyle{definition} \newtheorem{example}[thm]{Example} EndPreamble + Requires amsthm End @@ -154,6 +155,7 @@ \theoremstyle{definition} \newtheorem{problem}[thm]{Problem} EndPreamble + Requires amsthm End @@ -165,12 +167,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 @@ -196,6 +199,7 @@ \theoremstyle{remark} \newtheorem{claim}[thm]{Claim} EndPreamble + Requires amsthm End
Index: lib/layouts/amsmaths.inc =================================================================== --- lib/layouts/amsmaths.inc (Revision 23556) +++ lib/layouts/amsmaths.inc (Arbeitskopie) @@ -68,6 +68,7 @@ Series Bold EndFont Preamble + [EMAIL PROTECTED] \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] EndPreamble @@ -76,6 +77,7 @@ Style Theorem* CopyStyle Theorem + DependsOn Theorem LatexName thm* LabelType Static LabelString "Theorem." @@ -100,6 +102,7 @@ Style Corollary* CopyStyle Theorem* + DependsOn Theorem LatexName cor* LabelString "Corollary." Preamble @@ -123,6 +126,7 @@ Style Lemma* CopyStyle Theorem* + DependsOn Theorem LatexName lem* LabelString "Lemma." Preamble @@ -146,6 +150,7 @@ Style Proposition* CopyStyle Theorem* + DependsOn Theorem LatexName prop* LabelString "Proposition." Preamble @@ -158,6 +163,7 @@ Style Conjecture CopyStyle Theorem DependsOn Theorem + DependsOn Theorem LatexName conjecture LabelString "Conjecture @[EMAIL PROTECTED]" Preamble @@ -169,6 +175,7 @@ Style Conjecture* CopyStyle Theorem* + DependsOn Theorem LatexName conjecture* LabelString "Conjecture." Preamble @@ -191,6 +198,7 @@ Style Criterion* CopyStyle Theorem* + DependsOn Theorem LatexName criterion* LabelString "Criterion." Preamble @@ -214,6 +222,7 @@ Style Algorithm* CopyStyle Theorem* + DependsOn Theorem LatexName algorithm* LabelString "Algorithm." Preamble @@ -237,6 +246,7 @@ Style Fact* CopyStyle Theorem* + DependsOn Theorem LatexName fact* LabelString "Fact." Preamble @@ -260,6 +270,7 @@ Style Axiom* CopyStyle Theorem* + DependsOn Theorem LatexName ax* LabelString "Axiom." Preamble @@ -290,6 +301,7 @@ Style Definition* CopyStyle Definition + DependsOn Theorem LatexName defn* LabelType Static LabelString "Definition." @@ -302,6 +314,7 @@ Style Example CopyStyle Definition + DependsOn Theorem LatexName example LabelString "Example @[EMAIL PROTECTED]" Preamble @@ -313,6 +326,7 @@ Style Example* CopyStyle Definition* + DependsOn Theorem LatexName example* LabelString "Example." Preamble @@ -324,6 +338,7 @@ Style Condition CopyStyle Definition + DependsOn Theorem LatexName condition LabelString "Condition @[EMAIL PROTECTED]" Preamble @@ -335,6 +350,7 @@ Style Condition* CopyStyle Definition* + DependsOn Theorem LatexName condition* LabelString "Condition." Preamble @@ -346,6 +362,7 @@ Style Problem CopyStyle Definition + DependsOn Theorem LatexName problem LabelString "Problem @[EMAIL PROTECTED]" Preamble @@ -357,6 +374,7 @@ Style Problem* CopyStyle Definition* + DependsOn Theorem LatexName problem* LabelString "Problem." Preamble @@ -368,6 +386,7 @@ Style Exercise CopyStyle Definition + DependsOn Theorem LatexName xca LabelString "Exercise @[EMAIL PROTECTED]" Preamble @@ -379,6 +398,7 @@ Style Exercise* CopyStyle Definition* + DependsOn Theorem LatexName xca* LabelString "Exercise." Preamble @@ -410,6 +430,7 @@ Style Remark* CopyStyle Remark + DependsOn Theorem LatexName rem* LabelType Static LabelString "Remark." @@ -422,6 +443,7 @@ Style Claim CopyStyle Remark + DependsOn Theorem LatexName claim LabelString "Claim @[EMAIL PROTECTED]" Preamble @@ -433,6 +455,7 @@ Style Claim* CopyStyle Remark* + DependsOn Theorem LatexName claim* LabelString "Claim." Preamble @@ -444,6 +467,7 @@ Style Note CopyStyle Remark + DependsOn Theorem LatexName note LabelString "Note @[EMAIL PROTECTED]" Preamble @@ -455,6 +479,7 @@ Style Note* CopyStyle Remark* + DependsOn Theorem LatexName note* LabelString "Note." Preamble @@ -466,6 +491,7 @@ Style Notation CopyStyle Remark + DependsOn Theorem LatexName notation LabelString "Notation @[EMAIL PROTECTED]" Preamble @@ -477,6 +503,7 @@ Style Notation* CopyStyle Remark* + DependsOn Theorem LatexName notation* LabelString "Notation." Preamble @@ -488,6 +515,7 @@ Style Summary CopyStyle Remark + DependsOn Theorem LatexName summary LabelString "Summary @[EMAIL PROTECTED]" Preamble @@ -499,6 +527,7 @@ Style Summary* CopyStyle Remark* + DependsOn Theorem LatexName summary* LabelString "Summary." Preamble @@ -510,6 +539,7 @@ Style Acknowledgement CopyStyle Remark + DependsOn Theorem LatexName acknowledgement LabelString "Acknowledgement @[EMAIL PROTECTED]" Preamble @@ -521,6 +551,7 @@ Style Acknowledgement* CopyStyle Remark* + DependsOn Theorem LatexName acknowledgement* LabelString "Acknowledgement." Preamble @@ -532,6 +563,7 @@ Style Conclusion CopyStyle Remark + DependsOn Theorem LatexName conclusion LabelString "Conclusion @[EMAIL PROTECTED]" Preamble @@ -543,6 +575,7 @@ Style Conclusion* CopyStyle Remark* + DependsOn Theorem LatexName conclusion* LabelString "Conclusion." Preamble @@ -566,6 +599,7 @@ Style Assumption* CopyStyle Theorem* + DependsOn Theorem LatexName assumption* LabelString "Assumption." Preamble