Hi all,

I just discovered that amsmaths-plain.inc is borked in 1.5.4. The problems occur when a user composes a doc in one of the numbered AMS classes and then changes the class to ASM plain. Theoretically (no pun intended) we convert all the unstarred theorem-like environments to their starred versions, but two things are broken (except for Theorem itself, where for reasons I can't fathom only one is broken). First, we change for example 'lem' to 'lem*' but never load the Lemma* style (so that 'lem*' is undefined). Second, and this is the one that does not seem to affect Theorem, we still end up loading the preamble for the unstarred version, which piggybacks on a now-nonexistent thm counter.

Attached are a patch (against the amsmaths-plain.inc file from 1.5.4) and a test document, which begins life as a standard AMS article. If you compile the document as is, things work fine. If you convert it to article (AMS, unnumbered) and try to view it, you get one missing counter nag and two missing environment nags.

On a tangentially related note, should other developers (Richard maybe, and soon Russ) be listed in the comments at the top of the AMS layout files? I just mention this because my name is currently last, which means someone might be tempted to blame me for this. ;-)

/Paul

Attachment: casetest.lyx
Description: application/lyx

--- C:/Program Files/LyX 1.5.4/Resources/layouts/amsmaths-plain.inc     Tue Sep 
25 14:55:46 2007
+++ C:/Documents and Settings/Paul Rubin/Application 
Data/lyx15/layouts/amsmaths-plain.inc      Thu Mar 27 11:51:49 2008
@@ -38,130 +38,194 @@
 Style Theorem
        LatexName             thm*
        LabelString           "Theorem."
+  DependsOn             Theorem* 
 End
 
 
 Style Corollary
        LatexName             cor*
        LabelString           "Corollary."
+  DependsOn             Corollary*
+  Preamble
+  EndPreamble
 End
 
 
 Style Lemma
        LatexName             lem*
        LabelString           "Lemma."
+  DependsOn             Lemma*
+  Preamble
+  EndPreamble
 End
 
 
 Style Proposition
        LatexName             prop*
        LabelString           "Proposition."
+  DependsOn             Proposition*
+  Preamble
+  EndPreamble
 End
 
 
 Style Conjecture
        LatexName             conjecture*
        LabelString           "Conjecture."
+  DependsOn             Conjecture*
+  Preamble
+  EndPreamble
 End
 
 
 Style Criterion
        LatexName             criterion*
        LabelString           "Criterion."
+  DependsOn             Criterion*
+  Preamble
+  EndPreamble
 End
 
 
 Style Algorithm
        LatexName             algorithm*
        LabelString           "Algorithm."
+  DependsOn             Algorithm*
+  Preamble
+  EndPreamble
 End
 
 
 Style Fact
        LatexName             fact*
        LabelString           "Fact."
+  DependsOn             Fact*
+  Preamble
+  EndPreamble
 End
 
 
 Style Axiom
        LatexName             ax*
        LabelString           "Axiom."
+  DependsOn             Axiom*
+  Preamble
+  EndPreamble
 End
 
 
 Style Definition
        LatexName             defn*
        LabelString           "Definition."
+  DependsOn             Definition*
+  Preamble
+  EndPreamble
 End
 
 
 Style Example
        LatexName             example*
        LabelString           "Example."
+  DependsOn             Example*
+  Preamble
+  EndPreamble
 End
 
 
 Style Condition
        LatexName             condition*
        LabelString           "Condition."
+  DependsOn             Condition*
+  Preamble
+  EndPreamble
 End
 
 
 Style Problem
        LatexName             problem*
        LabelString           "Problem."
+  DependsOn             Problem*
+  Preamble
+  EndPreamble
 End
 
 
 Style Exercise
        LatexName             xca*
        LabelString           "Exercise."
+  DependsOn             Exercise*
+  Preamble
+  EndPreamble
 End
 
 
 Style Remark
        LatexName             rem*
        LabelString           "Remark."
+  DependsOn             Remark*
+  Preamble
+  EndPreamble
 End
 
 
 Style Claim
        LatexName             claim*
        LabelString           "Claim."
+  DependsOn             Claim*
+  Preamble
+  EndPreamble
 End
 
 
 Style Note
        LatexName             note*
        LabelString           "Note."
+  DependsOn             Note*
+  Preamble
+  EndPreamble
 End
 
 
 Style Notation
        LatexName             notation*
        LabelString           "Notation."
+  DependsOn             Notation*
+  Preamble
+  EndPreamble
 End
 
 
 Style Summary
        LatexName             summary*
        LabelString           "Summary."
+  DependsOn             Summary*
+  Preamble
+  EndPreamble
 End
 
 
 Style Acknowledgement
        LatexName             acknowledgement*
        LabelString           "Acknowledgement."
+  DependsOn             Acknowledgement*
+  Preamble
+  EndPreamble
 End
 
 
 Style Conclusion
        LatexName             conclusion*
        LabelString           "Conclusion."
+  DependsOn             Conclusion*
+  Preamble
+  EndPreamble
 End
 
 
 Style Assumption
        LatexName             assumption*
        LabelString           "Assumption."
+  DependsOn             Assumption*
+  Preamble
+  EndPreamble
 End

Reply via email to