#\DeclareLyXModule{AMS Theorems (Numbered by Type within Chapters)} #\DeclareCategory{Maths} #DescriptionBegin #Defines theorem environments and the proof environment using the extended #AMS machinery. Both numbered and unnumbered types are provided. Contrary to the #plain AMS Theorem module, the different theorem types provided here each have #a separate counter (e.g., theorem 1.1, theorem 1.2, lemma 1.1, proposition 1.1, #theorem 1.3, lemma 1.2, ..., as opposed to theorem 1, theorem 2, lemma 3, #proposition 4, ...). The numbering restarts for each chapter: theorem 1.1, #theorem 2.1, ... #DescriptionEnd #Requires: theorems-ams-bytype #Excludes: theorems-ams-extended-bytype # Original Author : David L. Johnson # Probably broken by Jean-Marc Lasgouttes # modified and modularized by Emmanuel GUREGHIAN # Tinkered with Sep. '07 by Paul Rubin # Modularized Jan 08 by Richard Kimberly Heck # Hacked June '09 by Paul Rubin to use separate counters # Chapter dependence added Oct '16 by Andrew Parsloe # Edited sep '22 by Udi Fogiel Format 99 Requires amsmath,amsthm Style Theorem Preamble \newcommand\lyx@newtheorem{\@ifstar{\newtheorem*}{\lyx@reg@newtheorem}} \theoremstyle{plain} \ifcsname c@chapter\endcsname \ifx\c@chapter\relax \newcommand\lyx@reg@newtheorem[2]{\newtheorem{#1}{#2}} \newtheorem{thm}{\protect\theoremname} \else \newcommand\lyx@reg@newtheorem[2]{\newtheorem{#1}{#2}[chapter]} \newtheorem{thm}{\protect\theoremname}[chapter] \fi \else \newcommand\lyx@reg@newtheorem[2]{\newtheorem{#1}{#2}} \newtheorem{thm}{\protect\theoremname} \fi EndPreamble End