I submitted some modules a while back to allow all the standard/AMS/AMS extended theorem-like environments to use separate counters. I don't see a ticket in Trac, so I guess I must have just e-mailed them to this list.

Turns out I borked the counter display in some of them. Corrected versions of three of the files are attached (I hope -- the list server won't let me attach a zip file, so I'm trying separate text files). I don't know if there's any plan to include these in a future version.

I'll also upload corrected versions to the wiki once I get a password. Does anyone want me to enter a Trac ticket on this?

Sorry for the redo,
Paul
# Original Author : David L. Johnson <d...@lehigh.edu>
# Probably broken by Jean-Marc Lasgouttes <jean-marc.lasgout...@inria.fr>
# modified and modularized by Emmanuel GUREGHIAN <gureg...@boston.bertin.fr>
# Tinkered with Sep. '07 by Paul Rubin <ru...@msu.edu>
# Modularized Jan 08 by Richard Heck <rgh...@comcast.net>
# Hacked June '09 by Paul Rubin <ru...@msu.edu> to use separate counters

# The environnements defined are :
# - Theorem
# - Corollary
# - Lemma
# - Proposition
# - Conjecture
# - Fact
# - Definition
# - Example
# - Problem
# - Exercise
# - Remark
# - Claim
# - Case (regular only -- defined as an enumeration)

# We need separate counters for each theorem-like style.
Counter theorem
End
Counter corollary
End
Counter lemma
End
Counter proposition
End
Counter conjecture
End
Counter fact
End
Counter definition
End
Counter example
End
Counter problem
End
Counter exercise
End
Counter remark
End
Counter claim
End

Format 11

Style Theorem
        Category              Theorem
        Margin                First_Dynamic
        LatexType             Environment
        LatexName             thm
        NextNoIndent          1
        OptionalArgs          1
        LabelSep              xx
        ParIndent             MMM
        ParSkip               0.4
        ItemSep               0.2
        TopSep                0.7
        BottomSep             0.7
        ParSep                0.3
        Align                 Block
        AlignPossible         Left
        LabelType             Counter
        LabelCounter          theorem
        LabelString           "Theorem \thetheorem."
        Font
          Shape               Italic
          Size                Normal
        EndFont
        LabelFont
          Shape               Up
          Series              Bold
        EndFont
        Preamble
                \theoremstyle{plain}
                \newtheorem{thm}{Theorem}
        EndPreamble
        Requires              amsthm
End


Style Corollary
        CopyStyle             Theorem
        LatexName             cor
        LabelString           "Corollary \thecorollary."
        Preamble
          \theoremstyle{plain}
          \newtheorem{cor}{Corollary}
        EndPreamble
        LabelCounter          corollary
End


Style Lemma
        CopyStyle             Theorem
        LatexName             lem
        LabelString           "Lemma \thelemma."
        Preamble
          \theoremstyle{plain}
          \newtheorem{lem}{Lemma}
        EndPreamble
        LabelCounter          lemma
End


Style Proposition
        CopyStyle             Theorem
        LatexName             prop
        LabelString           "Proposition \theproposition."
        Preamble
          \theoremstyle{plain}
          \newtheorem{prop}{Proposition}
        EndPreamble
        LabelCounter          proposition
End


Style Conjecture
        CopyStyle             Theorem
        LatexName             conjecture
        LabelString           "Conjecture \theconjecture."
        Preamble
          \theoremstyle{plain}
          \newtheorem{conjecture}{Conjecture}
        EndPreamble
        LabelCounter          conjecture
End


Style Fact
        CopyStyle             Theorem
        LatexName             fact
        LabelString           "Fact \thefact."
        Preamble
          \theoremstyle{plain}
          \newtheorem{fact}{Fact}
        EndPreamble
        LabelCounter          fact
End


Style Definition
        CopyStyle             Theorem
        LatexName             defn
        LabelString           "Definition \thedefinition."
        Font
          Shape               Up
        EndFont
        LabelFont
          Shape               Up
          Series              Bold
        EndFont
        Preamble
          \theoremstyle{definition}
          \newtheorem{defn}{Definition}
        EndPreamble
        LabelCounter          definition
End


Style Example
        CopyStyle             Definition
        LatexName             example
        LabelString           "Example \theexample."
        Preamble
         \theoremstyle{definition}
          \newtheorem{example}{Example}
        EndPreamble
        Requires              amsthm
        LabelCounter          example
End


Style Problem
        CopyStyle             Definition
        LatexName             problem
        LabelString           "Problem \theproblem."
        Preamble
          \theoremstyle{definition}
          \newtheorem{problem}{Problem}
        EndPreamble
        Requires              amsthm
        LabelCounter          problem
End


Style Exercise
        CopyStyle             Definition
        LatexName             xca
        LabelString           "Exercise \theexercise."
        Preamble
          \theoremstyle{definition}
          \newtheorem{xca}{Exercise}
        EndPreamble
        Requires              amsthm
        LabelCounter          exercise
End


Style Remark
        CopyStyle             Theorem
        LatexName             rem
        LabelString           "Remark \theremark."
        Font
          Shape               Up
          Size                Normal
        EndFont
        LabelFont
          Series              Medium
          Shape               Italic
        EndFont
        Preamble
          \theoremstyle{remark}
          \newtheorem{rem}{Remark}
        EndPreamble
        LabelCounter          remark
End


Style Claim
        CopyStyle             Remark
        LatexName             claim
        LabelString           "Claim \theclaim."
        Preamble
          \theoremstyle{remark}
          \newtheorem{claim}{Claim}
        EndPreamble
        Requires              amsthm
        LabelCounter          claim
End


# Define Case as an enumeration environment
Style Case
        Category              Theorem
        Margin                Static
        LatexType             Item_Environment
        LatexName             caseenv
        LabelType             Static
        NextNoIndent          1
        LeftMargin            "Case ###."
        ParSkip               0.0
        ItemSep               0.2
        TopSep                0.7
        BottomSep             0.7
        ParSep                0.3
        Align                 Block
        AlignPossible         Block, Left
        LabelSep              xx
        LabelString           "Case #."
        LabelFont
          Series              Medium
          Shape               Italic
        EndFont
        Preamble
          \newcounter{casectr}
          \newenvironment{caseenv}
          {\begin{list}{{\itshape\ Case} \arabic{casectr}.}{%
           \setlength{\leftmargin}{\labelwidth}
           \addtolength{\leftmargin}{\parskip}
           \setlength{\itemindent}{\listparindent}
           \setlength{\itemsep}{\medskipamount}
           \setlength{\topsep}{\itemsep}}
           \setcounter{casectr}{0}
           \usecounter{casectr}}
          {\end{list}}
        EndPreamble
End
#\DeclareLyXModule{Theorems (AMS-Extended, By Type)}
#DescriptionBegin
#Defines some additional theorem environments for use with the
#AMS theorems packages. Includes Criterion, Algorithm, Axiom,
#Condition, Note, Notation, Summary, Acknowledgement, Conclusion,
#Assumption, and Case, in both starred and non-starred forms.
#DescriptionEnd
#Requires: theorems-ams-bytype

# Original Author : David L. Johnson <d...@lehigh.edu>
# Probably broken by Jean-Marc Lasgouttes <jean-marc.lasgout...@inria.fr>
# modified and modularized by Emmanuel GUREGHIAN <gureg...@boston.bertin.fr>
# Tinkered with Sep. '07 by Paul Rubin <ru...@msu.edu>
# Modularized Jan 08 by Richard Heck <rgh...@comcast.net>
# Hacked June '09 by Paul Rubin <ru...@msu.edu> to use separate counters

Format 11

Requires        amsmath

# The environnements defined (regular and starred) are :
# - Criterion
# - Algorithm
# - Axiom
# - Condition
# - Note
# - Notation
# - Summary
# - Acknowledgement
# - Conclusion
# - Assumption

# We need separate counters for each theorem-like style.
Counter criterion
End
Counter algorithm
End
Counter axiom
End
Counter condition
End
Counter note
End
Counter notation
End
Counter summary
End
Counter acknowledgement
End
Counter conclusion
End
Counter assumption
End


Style Criterion
        CopyStyle             Theorem
        LatexName             criterion
        LabelString           "Criterion \thecriterion."
        Preamble
          \theoremstyle{plain}
          \newtheorem{criterion}{Criterion}
        EndPreamble
        LabelCounter          criterion
End

Style Criterion*
        CopyStyle             Theorem*
        LatexName             criterion*
        LabelString           "Criterion."
        Preamble
          \theoremstyle{plain}
          \newtheorem*{criterion*}{Criterion}
        EndPreamble
End


Style Algorithm
        CopyStyle             Theorem
        LatexName             algorithm
        LabelString           "Algorithm \thealgorithm."
        Preamble
          \theoremstyle{plain}
          \newtheorem{algorithm}{Algorithm}
        EndPreamble
        LabelCounter          algorithm
End


Style Algorithm*
        CopyStyle             Theorem*
        LatexName             algorithm*
        LabelString           "Algorithm."
        Preamble
          \theoremstyle{plain}
          \newtheorem*{algorithm*}{Algorithm}
        EndPreamble
End


Style Axiom
        CopyStyle             Theorem
        LatexName             ax
        LabelString           "Axiom \theaxiom."
        Preamble
          \theoremstyle{plain}
          \newtheorem{ax}{Axiom}
        EndPreamble
        LabelCounter          axiom
End


Style Axiom*
        CopyStyle             Theorem*
        LatexName             ax*
        LabelString           "Axiom."
        Preamble
          \theoremstyle{plain}
          \newtheorem*{ax*}{Axiom}
        EndPreamble
End


Style Condition
        CopyStyle             Definition
        LatexName             condition
        LabelString           "Condition \thecondition."
        Preamble
          \theoremstyle{definition}
          \newtheorem{condition}{Condition}
        EndPreamble
        LabelCounter          condition
End


Style Condition*
        CopyStyle             Definition*
        LatexName             condition*
        LabelString           "Condition."
        Preamble
          \theoremstyle{definition}
          \newtheorem*{condition*}{Condition}
        EndPreamble
End


Style Note
        CopyStyle             Remark
        LatexName             note
        LabelString           "Note \thenote."
        Preamble
          \theoremstyle{remark}
          \newtheorem{note}{Note}
        EndPreamble
        LabelCounter          note
End


Style Note*
        CopyStyle             Remark*
        LatexName             note*
        LabelString           "Note."
        Preamble
          \theoremstyle{remark}
          \newtheorem*{note*}{Note}
        EndPreamble
End


Style Notation
        CopyStyle             Remark
        LatexName             notation
        LabelString           "Notation \thenotation."
        Preamble
          \theoremstyle{remark}
          \newtheorem{notation}{Notation}
        EndPreamble
        LabelCounter          notation
End


Style Notation*
        CopyStyle             Remark*
        LatexName             notation*
        LabelString           "Notation."
        Preamble
          \theoremstyle{remark}
          \newtheorem*{notation*}{Notation}
        EndPreamble
End


Style Summary
        CopyStyle             Remark
        LatexName             summary
        LabelString           "Summary \thesummary."
        Preamble
          \theoremstyle{remark}
          \newtheorem{summary}{Summary}
        EndPreamble
        LabelCounter          summary
End


Style Summary*
        CopyStyle             Remark*
        LatexName             summary*
        LabelString           "Summary."
        Preamble
          \theoremstyle{remark}
          \newtheorem*{summary*}{Summary}
        EndPreamble
End


Style Acknowledgement
        CopyStyle             Remark
        LatexName             acknowledgement
        LabelString           "Acknowledgement \theacknowledgement."
        Preamble
          \theoremstyle{remark}
          \newtheorem{acknowledgement}{Acknowledgement}
        EndPreamble
        LabelCounter          acknowledgement
End


Style Acknowledgement*
        CopyStyle             Remark*
        LatexName             acknowledgement*
        LabelString           "Acknowledgement."
        Preamble
          \theoremstyle{remark}
          \newtheorem*{acknowledgement*}{Acknowledgement}
        EndPreamble
End


Style Conclusion
        CopyStyle             Remark
        LatexName             conclusion
        LabelString           "Conclusion \theconclusion."
        Preamble
          \theoremstyle{remark}
          \newtheorem{conclusion}{Conclusion}
        EndPreamble
        LabelCounter          conclusion
End


Style Conclusion*
        CopyStyle             Remark*
        LatexName             conclusion*
        LabelString           "Conclusion."
        Preamble
          \theoremstyle{remark}
          \newtheorem*{conclusion*}{Conclusion}
        EndPreamble
End


Style Assumption
        CopyStyle             Theorem
        LatexName             assumption
        LabelString           "Assumption \theassumption."
        Preamble
          \theoremstyle{plain}
          \newtheorem{assumption}{Assumption}
        EndPreamble
        LabelCounter          assumption
End


Style Assumption*
        CopyStyle             Theorem*
        LatexName             assumption*
        LabelString           "Assumption."
        Preamble
          \theoremstyle{plain}
          \newtheorem*{assumption*}{Assumption}
        EndPreamble
End
# Original Author : David L. Johnson <d...@lehigh.edu>
# Probably broken by Jean-Marc Lasgouttes <jean-marc.lasgout...@inria.fr>
# modified and modularized by Emmanuel GUREGHIAN <gureg...@boston.bertin.fr>
# Tinkered with Sep. '07 by Paul Rubin <ru...@msu.edu>
# Modularized Jan 08 by Richard Heck <rgh...@comcast.net>
# Hacked June '09 by Paul Rubin <ru...@msu.edu> to use separate counters

# The environnements defined are :
# - Theorem
# - Corollary
# - Lemma
# - Proposition
# - Conjecture
# - Fact
# - Definition
# - Example
# - Problem
# - Exercise
# - Remark
# - Claim
# - Proof
# - Case (regular only -- defined as an enumeration)

Format 11

Style Theorem
        Category              Theorem
        Margin                First_Dynamic
        LatexType             Environment
        LatexName             thm
        NextNoIndent          1
        OptionalArgs          1
        LabelSep              xx
        ParIndent             MMM
        ParSkip               0.4
        ItemSep               0.2
        TopSep                0.7
        BottomSep             0.7
        ParSep                0.3
        Align                 Block
        AlignPossible         Left
        LabelType             Counter
        LabelCounter          theorem
        LabelString           "Theorem \thetheorem."
        Font
          Shape               Italic
          Size                Normal
        EndFont
        LabelFont
          Shape               Up
          Series              Bold
        EndFont
        Preamble
    \theoremstyle{plain}
                \newtheorem{thm}{Theorem}
        EndPreamble
        Requires              amsthm
End


Style Corollary
        CopyStyle             Theorem
        LatexName             cor
        LabelString           "Corollary \thecorollary."
        Preamble
    \theoremstyle{plain}
          \newtheorem{cor}{Corollary}
        EndPreamble
        LabelCounter          corollary
End


Style Lemma
        CopyStyle             Theorem
        LatexName             lem
        LabelString           "Lemma \thelemma."
        Preamble
    \theoremstyle{plain}
          \newtheorem{lem}{Lemma}
        EndPreamble
        LabelCounter          lemma
End


Style Proposition
        CopyStyle             Theorem
        LatexName             prop
        LabelString           "Proposition \theproposition."
        Preamble
    \theoremstyle{plain}
          \newtheorem{prop}{Proposition}
        EndPreamble
        LabelCounter          proposition
End


Style Conjecture
        CopyStyle             Theorem
        LatexName             conjecture
        LabelString           "Conjecture \theconjecture."
        Preamble
    \theoremstyle{plain}
          \newtheorem{conjecture}{Conjecture}
        EndPreamble
        LabelCounter          conjecture
End


Style Fact
        CopyStyle             Theorem
        LatexName             fact
        LabelString           "Fact \thefact."
        Preamble
    \theoremstyle{plain}
          \newtheorem{fact}{Fact}
        EndPreamble
        LabelCounter          fact
End


Style Definition
        CopyStyle             Theorem
        LatexName             defn
        LabelString           "Definition \thedefinition."
        Font
          Shape               Up
        EndFont
        LabelFont
          Shape               Up
          Series              Bold
        EndFont
        Preamble
          \theoremstyle{definition}
          \newtheorem{defn}{Definition}
        EndPreamble
        LabelCounter          definition  
End


Style Example
        CopyStyle             Definition
        LatexName             example
        LabelString           "Example \theexample."
        Preamble
          \theoremstyle{definition}
          \newtheorem{example}{Example}
        EndPreamble
        Requires              amsthm
        LabelCounter          example
End


Style Problem
        CopyStyle             Definition
        LatexName             problem
        LabelString           "Problem \theproblem."
        Preamble
          \theoremstyle{definition}
          \newtheorem{problem}{Problem}
        EndPreamble
        Requires              amsthm
        LabelCounter          problem
End


Style Exercise
        CopyStyle             Definition
        LatexName             xca
        LabelString           "Exercise \theexercise."
        Preamble
          \theoremstyle{definition}
          \newtheorem{xca}{Exercise}
        EndPreamble
        Requires              amsthm
        LabelCounter          exercise
End


Style Remark
        CopyStyle             Theorem
        LatexName             rem
        LabelString           "Remark \theremark."
        Font
          Shape               Up
          Size                Normal
        EndFont
        LabelFont
          Series              Medium
          Shape               Italic
        EndFont
        Preamble
          \theoremstyle{remark}
          \newtheorem{rem}{Remark}
        EndPreamble
        LabelCounter          remark
End


Style Claim
        CopyStyle             Remark
        LatexName             claim
        LabelString           "Claim \theclaim."
        Preamble
          \theoremstyle{remark}
          \newtheorem{claim}{Claim}
        EndPreamble
        Requires              amsthm
        LabelCounter          claim
End


# Define Case as an enumeration environment
Style Case
        Category              Theorem
        CopyStyle             Enumerate
        LatexName             caseenv
        LabelType             Static
        LeftMargin            "Case ###."
        LabelString           "Case #."
        LabelFont
          Series              Medium
          Shape               Italic
        EndFont
        Preamble
          \newcounter{casectr}
          \newenvironment{caseenv}
          {\begin{list}{{\itshape\ Case} \arabic{casectr}.}{%
           \setlength{\leftmargin}{\labelwidth}
           \addtolength{\leftmargin}{\parskip}
           \setlength{\itemindent}{\listparindent}
           \setlength{\itemsep}{\medskipamount}
           \setlength{\topsep}{\itemsep}}
           \setcounter{casectr}{0}
           \usecounter{casectr}}
          {\end{list}}
        EndPreamble
End

Reply via email to