X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Ftheorems-ams-extended.module;h=0f33a90af3e8db88e01a2afbbf4252206c77a8f3;hb=761648b1f7d1df9de87921143b8004b6d3dd21e9;hp=daf4dd8cd4eafdcd3d95f68a7f3d2f2a27e2edb5;hpb=f5a5be4d188a20ee2a5c0213ee11bf64c0908841;p=lyx.git diff --git a/lib/layouts/theorems-ams-extended.module b/lib/layouts/theorems-ams-extended.module index daf4dd8cd4..0f33a90af3 100644 --- a/lib/layouts/theorems-ams-extended.module +++ b/lib/layouts/theorems-ams-extended.module @@ -1,11 +1,13 @@ -#\DeclareLyXModule{Theorems (AMS-Extended)} +#\DeclareLyXModule{AMS Theorems (Extended)} +#\DeclareCategory{Maths} #DescriptionBegin #Defines some additional theorem environments for use with the #AMS theorems packages. Includes Criterion, Algorithm, Axiom, #Condition, Note, Notation, Summary, Acknowledgement, Conclusion, -#Fact, Assumption, and Case, in both starred and non-starred forms. +#Fact, Assumption, Case, and Question, in both numbered and non-numbered +#forms. #DescriptionEnd -#Requires: Theorems (AMS) +#Requires: theorems-ams # Original Author : David L. Johnson # Probably broken by Jean-Marc Lasgouttes @@ -13,11 +15,11 @@ # Tinkered with Sep. '07 by Paul Rubin # Modularized Jan 08 by Richard Heck -Format 6 +Format 82 Requires amsmath -# The environnements defined (regular and starred) are : +# The environments defined (regular and starred) are : # - Criterion # - Algorithm # - Axiom @@ -29,17 +31,23 @@ Requires amsmath # - Conclusion # - Fact # - Assumption -# - Case (regular only -- defined as an enumeration) +# - Question Style Criterion CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName criterion LabelString "Criterion \thetheorem." Preamble \theoremstyle{plain} - \newtheorem{criterion}[thm]{Criterion} + \newtheorem{criterion}[thm]{\protect\criterionname} EndPreamble + LangPreamble + \providecommand{\criterionname}{_(Criterion)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}} + EndBabelPreamble End Style Criterion* @@ -48,43 +56,67 @@ Style Criterion* LabelString "Criterion." Preamble \theoremstyle{plain} - \newtheorem*{criterion*}{Criterion} + \newtheorem*{criterion*}{\protect\criterionname} EndPreamble + LangPreamble + \providecommand{\criterionname}{_(Criterion)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}} + EndBabelPreamble End Style Algorithm CopyStyle Theorem - DependsOn Theorem - LatexName algorithm + DependsOn Theorem + LatexName lyxalgorithm LabelString "Algorithm \thetheorem." Preamble \theoremstyle{plain} - \newtheorem{algorithm}[thm]{Algorithm} + \newtheorem{lyxalgorithm}[thm]{\protect\algorithmname} EndPreamble + LangPreamble + \providecommand{\algorithmname}{_(Algorithm)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}} + EndBabelPreamble End Style Algorithm* CopyStyle Theorem* - LatexName algorithm* + LatexName lyxalgorithm* LabelString "Algorithm." Preamble \theoremstyle{plain} - \newtheorem*{algorithm*}{Algorithm} + \newtheorem*{lyxalgorithm*}{\protect\algorithmname} EndPreamble + LangPreamble + \providecommand{\algorithmname}{_(Algorithm)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}} + EndBabelPreamble End Style Axiom CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName ax LabelString "Axiom \thetheorem." Preamble \theoremstyle{plain} - \newtheorem{ax}[thm]{Axiom} + \newtheorem{ax}[thm]{\protect\axiomname} EndPreamble + LangPreamble + \providecommand{\axiomname}{_(Axiom)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}} + EndBabelPreamble End @@ -94,8 +126,14 @@ Style Axiom* LabelString "Axiom." Preamble \theoremstyle{plain} - \newtheorem*{ax*}{Axiom} + \newtheorem*{ax*}{\protect\axiomname} EndPreamble + LangPreamble + \providecommand{\axiomname}{_(Axiom)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}} + EndBabelPreamble End @@ -105,8 +143,14 @@ Style Condition LabelString "Condition \thetheorem." Preamble \theoremstyle{definition} - \newtheorem{condition}[thm]{Condition} + \newtheorem{condition}[thm]{\protect\conditionname} EndPreamble + LangPreamble + \providecommand{\conditionname}{_(Condition)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}} + EndBabelPreamble End @@ -116,8 +160,14 @@ Style Condition* LabelString "Condition." Preamble \theoremstyle{definition} - \newtheorem*{condition*}{Condition} + \newtheorem*{condition*}{\protect\conditionname} EndPreamble + LangPreamble + \providecommand{\conditionname}{_(Condition)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}} + EndBabelPreamble End @@ -127,8 +177,14 @@ Style Note LabelString "Note \thetheorem." Preamble \theoremstyle{remark} - \newtheorem{note}[thm]{Note} + \newtheorem{note}[thm]{\protect\notename} EndPreamble + LangPreamble + \providecommand{\notename}{_(Note)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\notename}{_(Note)}} + EndBabelPreamble End @@ -138,8 +194,14 @@ Style Note* LabelString "Note." Preamble \theoremstyle{remark} - \newtheorem*{note*}{Note} + \newtheorem*{note*}{\protect\notename} EndPreamble + LangPreamble + \providecommand{\notename}{_(Note)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\notename}{_(Note)}} + EndBabelPreamble End @@ -149,8 +211,14 @@ Style Notation LabelString "Notation \thetheorem." Preamble \theoremstyle{remark} - \newtheorem{notation}[thm]{Notation} + \newtheorem{notation}[thm]{\protect\notationname} EndPreamble + LangPreamble + \providecommand{\notationname}{_(Notation)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}} + EndBabelPreamble End @@ -160,8 +228,14 @@ Style Notation* LabelString "Notation." Preamble \theoremstyle{remark} - \newtheorem*{notation*}{Notation} + \newtheorem*{notation*}{\protect\notationname} EndPreamble + LangPreamble + \providecommand{\notationname}{_(Notation)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}} + EndBabelPreamble End @@ -171,8 +245,14 @@ Style Summary LabelString "Summary \thetheorem." Preamble \theoremstyle{remark} - \newtheorem{summary}[thm]{Summary} + \newtheorem{summary}[thm]{\protect\summaryname} EndPreamble + LangPreamble + \providecommand{\summaryname}{_(Summary)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}} + EndBabelPreamble End @@ -182,8 +262,14 @@ Style Summary* LabelString "Summary." Preamble \theoremstyle{remark} - \newtheorem*{summary*}{Summary} + \newtheorem*{summary*}{\protect\summaryname} EndPreamble + LangPreamble + \providecommand{\summaryname}{_(Summary)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}} + EndBabelPreamble End @@ -193,8 +279,14 @@ Style Acknowledgement LabelString "Acknowledgement \thetheorem." Preamble \theoremstyle{remark} - \newtheorem{acknowledgement}[thm]{Acknowledgement} + \newtheorem{acknowledgement}[thm]{\protect\acknowledgementname} EndPreamble + LangPreamble + \providecommand{\acknowledgementname}{_(Acknowledgement)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}} + EndBabelPreamble End @@ -204,8 +296,14 @@ Style Acknowledgement* LabelString "Acknowledgement." Preamble \theoremstyle{remark} - \newtheorem*{acknowledgement*}{Acknowledgement} + \newtheorem*{acknowledgement*}{\protect\acknowledgementname} EndPreamble + LangPreamble + \providecommand{\acknowledgementname}{_(Acknowledgement)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}} + EndBabelPreamble End @@ -215,8 +313,14 @@ Style Conclusion LabelString "Conclusion \thetheorem." Preamble \theoremstyle{remark} - \newtheorem{conclusion}[thm]{Conclusion} + \newtheorem{conclusion}[thm]{\protect\conclusionname} EndPreamble + LangPreamble + \providecommand{\conclusionname}{_(Conclusion)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}} + EndBabelPreamble End @@ -226,20 +330,32 @@ Style Conclusion* LabelString "Conclusion." Preamble \theoremstyle{remark} - \newtheorem*{conclusion*}{Conclusion} + \newtheorem*{conclusion*}{\protect\conclusionname} EndPreamble + LangPreamble + \providecommand{\conclusionname}{_(Conclusion)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}} + EndBabelPreamble End Style Assumption CopyStyle Theorem - DependsOn Theorem + DependsOn Theorem LatexName assumption LabelString "Assumption \thetheorem." Preamble \theoremstyle{plain} - \newtheorem{assumption}[thm]{Assumption} + \newtheorem{assumption}[thm]{\protect\assumptionname} EndPreamble + LangPreamble + \providecommand{\assumptionname}{_(Assumption)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}} + EndBabelPreamble End @@ -249,23 +365,47 @@ Style Assumption* LabelString "Assumption." Preamble \theoremstyle{plain} - \newtheorem*{assumption*}{Assumption} + \newtheorem*{assumption*}{\protect\assumptionname} EndPreamble + LangPreamble + \providecommand{\assumptionname}{_(Assumption)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}} + EndBabelPreamble End +Style Question + CopyStyle Theorem + DependsOn Theorem + LatexName question + LabelString "Question \thetheorem." + Preamble + \theoremstyle{plain} + \newtheorem{question}[thm]{\protect\questionname} + EndPreamble + LangPreamble + \providecommand{\questionname}{_(Question)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}} + EndBabelPreamble +End -# Define Case as an enumeration environment -Style Case - CopyStyle Enumerate - LatexName caseenv - LabelType Static - LeftMargin "MMMMMMN" - LabelString "Case #:" +Style Question* + CopyStyle Theorem* + LatexName question* + LabelString "Question." Preamble - \newcounter{casectr} - \newenvironment{caseenv} -{\begin{list}{\bfseries\upshape Case \arabic{casectr}:}{}\setcounter{casectr}{0}\usecounter{casectr}} -{\end{list}} + \theoremstyle{plain} + \newtheorem*{question*}{\protect\questionname} EndPreamble + LangPreamble + \providecommand{\questionname}{_(Question)} + EndLangPreamble + BabelPreamble + \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}} + EndBabelPreamble End +Input theorems-refprefix.inc