#\DeclareLyXModule{Theorems (thmtools, Numbered by Type)} #\DeclareCategory{Maths} #DescriptionBegin #Defines the theorem environments defined in the AMS-Theorem modules using the #thmtools machinery. Both numbered and unnumbered types are provided. In Addition, #one can use the \listoftheorems command provided by the thmtools.sty package. #DescriptionEnd #Excludes: theorems-std | theorems-ams | theorems-bytype | theorems-ams-bytype # Original Author: Udi Fogiel Format 99 # The environments defined are: # - Theorem # - Corollary # - Lemma # - Proposition # - Conjecture # - Fact # - Definition # - Example # - Problem # - Exercise # - Solution # - Remark # - Claim # - Theorem* # - Corollary* # - Lemma* # - Proposition* # - Conjecture* # - Fact* # - Definition* # - Example* # - Problem* # - Exercise* # - Solution* # - Remark* # - Claim* # We need separate counters for each theorem-like style. Counter theorem Within section End Counter corollary Within section End Counter lemma Within section End Counter proposition Within section End Counter conjecture Within section End Counter fact Within section End Counter definition Within section End Counter example Within section End Counter problem Within section End Counter exercise Within section End Counter remark Within section End Counter claim Within section End OutlinerName thm "Definitions & Theorems" Style Theorem Category Reasoning Margin First_Dynamic LatexType Environment LatexName thm NextNoIndent 1 ResetArgs 1 AddToToc thm IsTocCaption 1 Argument 1 LabelString "Theorem Name" Tooltip "Additional text appended to the theorem header" IsTocCaption 1 EndArgument LabelSep xx ParIndent MMM ParSkip 0.4 ItemSep 0.2 TopSep 0.7 BottomSep 0.7 ParSep 0.3 Align Block AlignPossible Left LabelType Static LabelCounter theorem LabelString "Theorem \thetheorem." Font Shape Italic Size Normal EndFont LabelFont Shape Up Series Bold EndFont Preamble \usepackage{thmtools} \renewcommand{\thmt@mklistcmd}{% \ifcsname lyx\csname thmt@envname\endcsname name\endcsname \thmtlo@newentry \ifthmt@isstarred \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\ifthmt@listswap \protect\else \protect\numberline{\protect\let\protect\autodot\protect\@empty}% \protect\fi \csname lyx\csname thmt@envname\endcsname name\endcsname \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \else \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\ifthmt@listswap \csname lyx\csname thmt@envname\endcsname name\endcsname~\csname the\thmt@envname\endcsname \protect\else \protect\numberline{\csname the\thmt@envname\endcsname}% \csname lyx\csname thmt@envname\endcsname name\endcsname \protect\fi \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \fi \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{% \thmt@contentslineShow }% \else \thmtlo@newentry \ifthmt@isstarred \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\ifthmt@listswap \protect\else \protect\numberline{\protect\let\protect\autodot\protect\@empty}% \protect\fi \thmt@thmname \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \else \@xa\def\csname ll@\thmt@envname\endcsname{% \protect\ifthmt@listswap \thmt@thmname~\csname the\thmt@envname\endcsname \protect\else \protect\numberline{\csname the\thmt@envname\endcsname}% \thmt@thmname \protect\fi \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi }% \fi \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{% \thmt@contentslineShow }% \fi } \expandafter\providecommand\csname lyxthmname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxthmname\endcsname]{thm} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxthmname\endcsname{_(Theorem)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxthmname\endcsname{_(Theorem)}} EndBabelPreamble Requires amsthm DocBookWrapperTag figure DocBookWrapperAttr role='theorem' DocBookTag para DocBookGenerateTitle true End Style Theorem* Category Reasoning LatexType Environment Margin First_Dynamic LatexName thm* LabelType Static LabelString "Theorem." NextNoIndent 1 ResetArgs 1 AddToToc thm IsTocCaption 1 Argument 1 LabelString "Theorem Name" Tooltip "Additional text appended to the theorem header" IsTocCaption 1 EndArgument LabelSep xx ParIndent MMM ParSkip 0.4 ItemSep 0.2 TopSep 0.7 BottomSep 0.7 ParSep 0.3 Align Block AlignPossible Left Font Shape Italic Size Normal EndFont LabelFont Shape Up Series Bold EndFont Preamble \expandafter\providecommand\csname lyxthm*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxthm*name\endcsname]{thm*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxthm*name\endcsname{_(Theorem)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxthm*name\endcsname{_(Theorem)}} EndBabelPreamble Requires amsthm DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='theorem' DocBookTag para DocBookGenerateTitle true End Style Corollary CopyStyle Theorem LatexName cor LabelString "Corollary \thecorollary." Preamble \expandafter\providecommand\csname lyxcorname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxcorname\endcsname]{cor} EndPreamble LabelCounter corollary LangPreamble \expandafter\renewcommand\csname lyxcorname\endcsname{_(Corollary)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxcorname\endcsname{_(Corollary)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='corollary' DocBookTag para DocBookGenerateTitle true End Style Corollary* CopyStyle Theorem* LatexName cor* LabelString "Corollary." Preamble \expandafter\providecommand\csname lyxcor*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxcorname\endcsname]{cor*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxcor*name\endcsname{_(Corollary)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxcor*name\endcsname{_(Corollary)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='corollary' DocBookTag para DocBookGenerateTitle true End Style Lemma CopyStyle Theorem LatexName lem LabelString "Lemma \thelemma." Preamble \expandafter\providecommand\csname lyxlemname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxlemname\endcsname]{lem} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxlemname\endcsname{_(Lemma)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxlemname\endcsname{_(Lemma)}} EndBabelPreamble LabelCounter lemma DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='lemma' DocBookTag para DocBookGenerateTitle true End Style Lemma* CopyStyle Theorem* LatexName lem* LabelString "Lemma." Preamble \expandafter\providecommand\csname lyxlem*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxlem*name\endcsname]{lem*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxlem*name\endcsname{_(Lemma)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxlem*name\endcsname{_(Lemma)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='lemma' DocBookTag para DocBookGenerateTitle true End Style Proposition CopyStyle Theorem LatexName prop LabelString "Proposition \theproposition." Preamble \expandafter\providecommand\csname lyxpropname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxpropname\endcsname]{prop} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxpropname\endcsname{_(Proposition)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxpropname\endcsname{_(Proposition)}} EndBabelPreamble LabelCounter proposition DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='proposition' DocBookTag para DocBookGenerateTitle true End Style Proposition* CopyStyle Theorem* LatexName prop* LabelString "Proposition." Preamble \expandafter\providecommand\csname lyxprop*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxprop*name\endcsname]{prop*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxprop*name\endcsname{_(Proposition)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxprop*name\endcsname{_(Proposition)}} EndBabelPreamble LabelCounter proposition DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='proposition' DocBookTag para DocBookGenerateTitle true End Style Conjecture CopyStyle Theorem LatexName conjecture LabelString "Conjecture \theconjecture." Preamble \expandafter\providecommand\csname lyxconjecturename\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxconjecturename\endcsname]{conjecture} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxconjecturename\endcsname{_(Conjecture)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxconjecturename\endcsname{_(Conjecture)}} EndBabelPreamble LabelCounter conjecture DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='conjecture' DocBookTag para DocBookGenerateTitle true End Style Conjecture* CopyStyle Theorem* LatexName conjecture* LabelString "Conjecture." Preamble \expandafter\providecommand\csname lyxconjecture*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxconjecture*name\endcsname]{conjecture*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxconjecture*name\endcsname{_(Conjecture)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxconjecture*name\endcsname{_(Conjecture)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='conjecture' DocBookTag para DocBookGenerateTitle true End Style Fact CopyStyle Theorem LatexName fact LabelString "Fact \thefact." Preamble \expandafter\providecommand\csname lyxfactname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxfactname\endcsname]{fact} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxfactname\endcsname{_(Fact)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxfactname\endcsname{_(Fact)}} EndBabelPreamble LabelCounter fact DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='fact' DocBookTag para DocBookGenerateTitle true End Style Fact* CopyStyle Theorem* LatexName fact* LabelString "Fact." Preamble \expandafter\providecommand\csname lyxfact*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxfact*name\endcsname]{fact*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxfact*name\endcsname{_(Fact)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxfact*name\endcsname{_(Fact)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='fact' DocBookTag para DocBookGenerateTitle true End Style Definition CopyStyle Theorem LatexName defn LabelString "Definition \thedefinition." Font Shape Up EndFont LabelFont Shape Up Series Bold EndFont Preamble \expandafter\providecommand\csname lyxdefnname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxdefnname\endcsname,style=definition]{defn} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxdefnname\endcsname{_(Definition)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxdefnname\endcsname{_(Definition)}} EndBabelPreamble LabelCounter definition DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='definition' DocBookTag para DocBookGenerateTitle true End Style Definition* CopyStyle Theorem* LatexName defn* LabelType Static LabelString "Definition." Font Shape Up EndFont LabelFont Shape Up Series Bold EndFont Preamble \expandafter\providecommand\csname lyxdefn*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxdefn*name\endcsname,style=definition]{defn*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxdefn*name\endcsname{_(Definition)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxdefn*name\endcsname{_(Definition)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='definition' DocBookTag para DocBookGenerateTitle true End Style Example CopyStyle Definition LatexName example LabelString "Example \theexample." Preamble \expandafter\providecommand\csname lyxexamplename\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxexamplename\endcsname,style=definition]{example} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxexamplename\endcsname{_(Example)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxexamplename\endcsname{_(Example)}} EndBabelPreamble LabelCounter example DependsOn Theorem DocBookWrapperTag example DocBookTag para DocBookAttr "" DocBookGenerateTitle true End Style Example* CopyStyle Definition* LatexName example* LabelString "Example." Preamble \expandafter\providecommand\csname lyxexample*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxexample*name\endcsname,style=definition]{example*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxexample*name\endcsname{_(Example)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxexample*name\endcsname{_(Example)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag informalexample DocBookTag para DocBookAttr "" End Style Problem CopyStyle Definition LatexName problem LabelString "Problem \theproblem." Preamble \expandafter\providecommand\csname lyxproblemname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxproblemname\endcsname,style=definition]{problem} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxproblemname\endcsname{_(Problem)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxproblemname\endcsname{_(Problem)}} EndBabelPreamble LabelCounter problem DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='problem' DocBookTag para DocBookGenerateTitle true End Style Problem* CopyStyle Definition* LatexName problem* LabelString "Problem." Preamble \expandafter\providecommand\csname lyxproblem*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxproblem*name\endcsname,style=definition]{problem*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxproblem*name\endcsname{_(Problem)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxproblem*name\endcsname{_(Problem)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='problem' DocBookTag para DocBookGenerateTitle true End Style Exercise CopyStyle Definition LatexName xca LabelString "Exercise \theexercise." Preamble \expandafter\providecommand\csname lyxxcaname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxxcaname\endcsname,style=definition]{xca} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxxcaname\endcsname{_(Exercise)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxxcaname\endcsname{_(Exercise)}} EndBabelPreamble LabelCounter exercise DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='exercise' DocBookTag para DocBookGenerateTitle true End Style Exercise* CopyStyle Definition* LatexName xca* LabelString "Exercise." Preamble \expandafter\providecommand\csname lyxxca*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxxca*name\endcsname,style=definition]{xca*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxxca*name\endcsname{_(Exercise)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxxca*name\endcsname{_(Exercise)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='exercise' DocBookTag para DocBookGenerateTitle true End Style Solution CopyStyle Definition LatexName sol LabelString "Solution \thesolution." Preamble \expandafter\providecommand\csname lyxsolname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxsolname\endcsname,style=definition]{sol} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxsolname\endcsname{_(Solution)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxsolname\endcsname{_(Solution)}} EndBabelPreamble LabelCounter solution DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='solution' DocBookTag para DocBookGenerateTitle true End Style Solution* CopyStyle Definition* LatexName sol* LabelString "Solution." Preamble \expandafter\providecommand\csname lyxsol*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxsol*name\endcsname,style=definition]{sol*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxsol*name\endcsname{_(Solution)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxsol*name\endcsname{_(Solution)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='solution' DocBookTag para DocBookGenerateTitle true End Style Remark CopyStyle Theorem LatexName rem LabelString "Remark \theremark." Font Shape Up Size Normal EndFont LabelFont Series Medium Shape Italic EndFont Preamble \expandafter\providecommand\csname lyxremname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxremname\endcsname,style=remark]{rem} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxremname\endcsname{_(Remark)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxremname\endcsname{_(Remark)}} EndBabelPreamble LabelCounter remark DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='remark' DocBookTag para DocBookGenerateTitle true End Style Remark* CopyStyle Theorem* LatexName rem* LabelString "Remark." Font Shape Up Size Normal EndFont LabelFont Series Medium Shape Italic EndFont Preamble \expandafter\providecommand\csname lyxrem*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxrem*name\endcsname,style=remark]{rem*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxrem*name\endcsname{_(Remark)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxrem*name\endcsname{_(Remark)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='remark' DocBookTag para DocBookGenerateTitle true End Style Claim CopyStyle Remark LatexName claim LabelString "Claim \theclaim." Preamble \expandafter\providecommand\csname lyxclaimname\endcsname{} \declaretheorem[numberwithin=section,name=\protect\csname lyxclaimname\endcsname,style=remark]{claim} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxclaimname\endcsname{_(Claim)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxclaimname\endcsname{_(Claim)}} EndBabelPreamble LabelCounter claim DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='claim' DocBookTag para DocBookGenerateTitle true End Style Claim* CopyStyle Remark* LatexName claim* LabelString "Claim." Preamble \expandafter\providecommand\csname lyxclaim*name\endcsname{} \declaretheorem[numbered=no,name=\protect\csname lyxclaim*name\endcsname,style=remark]{claim*} EndPreamble LangPreamble \expandafter\renewcommand\csname lyxclaim*name\endcsname{_(Claim)} EndLangPreamble BabelPreamble \addto\captions$$lang{\expandafter\renewcommand\csname lyxclaim*name\endcsname{_(Claim)}} EndBabelPreamble DependsOn Theorem DocBookWrapperTag figure DocBookWrapperAttr role='claim' DocBookTag para DocBookGenerateTitle true End InsetLayout "Flex:List of Theorems" LyXType custom LatexType command Decoration classic LatexName listoftheorems LabelString "List of theorems" Argument 1 LabelString "keys" Tooltip "Insert wanted keys here" PassThru 1 Mandatory 0 AutoInsert 1 EndArgument Font Color latex Family typewriter EndFont LabelFont Color latex Size Small EndFont MultiPar true CustomPars false ForcePlain true PassThru true ParbreakIsNewline true KeepEmpty true FreeSpacing true Preamble \usepackage{thmtools} \declaretheorem{lyxdummytheorem} EndPreamble End Input theorems-case.inc Input theorems-proof.inc Input theorems-refprefix.inc