[EMAIL PROTECTED] (Jürgen Spitzmüller) writes:

> Jean-Marc Lasgouttes wrote:
>> Because in some version of the class, other theorem-like are declared
>> as using the [thm] numbering. So theorem has to be declared
>> beforehand.
>
> Could you elaborate a bit?

Create a amsart.layout-based document with just a corollary. It won't
typeset because it relies on a "thm" counter.

The following patch takes care of defining the theorem environment
when needed. It is however only lightly tested. The important part is
the "DependsOn Theorem" in amsmath.inc which makes sure that the
preamble snippet of Theorem is included.

JMarc

svndiff lib/layouts/

Index: lib/layouts/amsmaths-seq.inc
===================================================================
--- lib/layouts/amsmaths-seq.inc	(révision 20971)
+++ lib/layouts/amsmaths-seq.inc	(copie de travail)
@@ -159,6 +159,7 @@ End
 
 Style Corollary
 	LabelCounter          corollary
+	DependsOn	      ""
 	LabelString           "Corollary \arabic{corollary}."
 	Preamble
 	  \theoremstyle{plain}
@@ -169,6 +170,7 @@ End
 
 Style Lemma
 	LabelCounter          lemma
+	DependsOn	      ""
 	LabelString           "Lemma \arabic{lemma}."
 	Preamble
 	  \theoremstyle{plain}
@@ -179,6 +181,7 @@ End
 
 Style Proposition
 	LabelCounter          proposition
+	DependsOn	      ""
 	LabelString           "Proposition \arabic{proposition}."
 	Preamble
 	  \theoremstyle{plain}
@@ -189,6 +192,7 @@ End
 
 Style Conjecture
 	LabelCounter          conjecture
+	DependsOn	      ""
 	LabelString           "Conjecture \arabic{conjecture}."
 	Preamble
 	  \theoremstyle{plain}
@@ -199,6 +203,7 @@ End
 
 Style Criterion
 	LabelCounter          criterion
+	DependsOn	      ""
 	LabelString           "Criterion \arabic{criterion}."
 	Preamble
 	  \theoremstyle{plain}
@@ -209,6 +214,7 @@ End
 
 Style Algorithm
 	LabelCounter          algorithm
+	DependsOn	      ""
 	LabelString           "Algorithm \arabic{algorithm}."
 	Preamble
 	  \theoremstyle{plain}
@@ -219,6 +225,7 @@ End
 
 Style Fact
 	LabelCounter          fact
+	DependsOn	      ""
 	LabelString           "Fact \arabic{fact}."
 	Preamble
 	  \theoremstyle{plain}
@@ -229,6 +236,7 @@ End
 
 Style Axiom
 	LabelCounter          axiom
+	DependsOn	      ""
 	LabelString           "Axiom \arabic{axiom}."
 	Preamble
 	  \theoremstyle{plain}
@@ -239,6 +247,7 @@ End
 
 Style Definition
 	LabelCounter          definition
+	DependsOn	      ""
 	LabelString           "Definition \arabic{definition}."
 	Preamble
 	 \theoremstyle{definition}
@@ -249,6 +258,7 @@ End
 
 Style Example
 	LabelCounter          example
+	DependsOn	      ""
 	LabelString           "Example \arabic{example}."
 	Preamble
 	 \theoremstyle{definition}
@@ -259,6 +269,7 @@ End
 
 Style Condition
 	LabelCounter          condition
+	DependsOn	      ""
 	LabelString           "Condition \arabic{condition}."
 	Preamble
 	 \theoremstyle{definition}
@@ -269,6 +280,7 @@ End
 
 Style Problem
 	LabelCounter          problem
+	DependsOn	      ""
 	LabelString           "Problem \arabic{problem}."
 	Preamble
 	 \theoremstyle{definition}
@@ -279,6 +291,7 @@ End
 
 Style Exercise
 	LabelCounter          exercise
+	DependsOn	      ""
 	LabelString           "Exercise \arabic{exercise}."
 	Preamble
 	 \theoremstyle{definition}
@@ -289,6 +302,7 @@ End
 
 Style Remark
 	LabelCounter          remark
+	DependsOn	      ""
 	LabelString           "Remark \arabic{remark}."
 	Preamble
 	  \theoremstyle{remark}
@@ -299,6 +313,7 @@ End
 
 Style Claim
 	LabelCounter          claim
+	DependsOn	      ""
 	LabelString           "Claim \arabic{claim}."
 	Preamble
 	  \theoremstyle{remark}
@@ -309,6 +324,7 @@ End
 
 Style Note
 	LabelCounter          note
+	DependsOn	      ""
 	LabelString           "Note \arabic{note}."
 	Preamble
 	  \theoremstyle{remark}
@@ -319,6 +335,7 @@ End
 
 Style Notation
 	LabelCounter          notation
+	DependsOn	      ""
 	LabelString           "Notation \arabic{notation}."
 	Preamble
 	  \theoremstyle{remark}
@@ -329,6 +346,7 @@ End
 
 Style Summary
 	LabelCounter          summary
+	DependsOn	      ""
 	LabelString           "Summary \arabic{summary}."
 	Preamble
 	  \theoremstyle{remark}
@@ -339,6 +357,7 @@ End
 
 Style Acknowledgement
 	LabelCounter          acknowledgement
+	DependsOn	      ""
 	LabelString           "Acknowledgement \arabic{acknowledgement}."
 	Preamble
 	  \theoremstyle{remark}
@@ -349,6 +368,7 @@ End
 
 Style Conclusion
 	LabelCounter          conclusion
+	DependsOn	      ""
 	LabelString           "Conclusion \arabic{conclusion}."
 	Preamble
 	  \theoremstyle{remark}
@@ -359,6 +379,7 @@ End
 
 Style Assumption
 	LabelCounter          assumption
+	DependsOn	      ""
 	LabelString           "Assumption \arabic{assumption}."
 	Preamble
 	  \theoremstyle{plain}
Index: lib/layouts/amsmaths.inc
===================================================================
--- lib/layouts/amsmaths.inc	(révision 20971)
+++ lib/layouts/amsmaths.inc	(copie de travail)
@@ -45,7 +45,6 @@ Style Theorem
 	Margin                First_Dynamic
 	LatexType             Environment
 	LatexName             thm
-	#DependsOn             TheoremStyle
 	NextNoIndent          1
 	LabelSep              xx
 	ParIndent             MMM
@@ -88,6 +87,7 @@ End
 
 Style Corollary
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             cor
 	LabelString           "Corollary @[EMAIL PROTECTED]"
 	Preamble
@@ -110,6 +110,7 @@ End
 
 Style Lemma
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             lem
 	LabelString           "Lemma @[EMAIL PROTECTED]"
 	Preamble
@@ -132,6 +133,7 @@ End
 
 Style Proposition
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             prop
 	LabelString           "Proposition @[EMAIL PROTECTED]"
 	Preamble
@@ -154,6 +156,7 @@ End
 
 Style Conjecture
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             conjecture
 	LabelString           "Conjecture @[EMAIL PROTECTED]"
 	Preamble
@@ -176,6 +179,7 @@ End
 
 Style Criterion
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             criterion
 	LabelString           "Criterion @[EMAIL PROTECTED]"
 	Preamble
@@ -197,6 +201,7 @@ End
 
 Style Algorithm
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             algorithm
 	LabelString           "Algorithm @[EMAIL PROTECTED]"
 	Preamble
@@ -219,6 +224,7 @@ End
 
 Style Fact
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             fact
 	LabelString           "Fact @[EMAIL PROTECTED]"
 	Preamble
@@ -241,6 +247,7 @@ End
 
 Style Axiom
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             ax
 	LabelString           "Axiom @[EMAIL PROTECTED]"
 	Preamble
@@ -263,6 +270,7 @@ End
 
 Style Definition
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             defn
 	LabelString           "Definition @[EMAIL PROTECTED]"
 	Font
@@ -381,6 +389,7 @@ End
 
 Style Remark
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             rem
 	LabelString           "Remark @[EMAIL PROTECTED]"
 	Font
@@ -544,6 +553,7 @@ End
 
 Style Assumption
 	CopyStyle             Theorem
+	DependsOn	      Theorem
 	LatexName             assumption
 	LabelString           "Assumption @[EMAIL PROTECTED]"
 	Preamble

Reply via email to