]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/theorems.inc
Question environments, from Russ Woodroofe.
[lyx.git] / lib / layouts / theorems.inc
index 05b66dbc9dbc0b55b2e47c78985d995bbad712b9..42fed2beb2abadb0fdf7a053404538526e983522 100644 (file)
 # - Remark
 # - Claim
 # - Proof
+# - Case (regular only -- defined as an enumeration)
 
-Format 6
+Format 11
 
 Style Theorem
+       Category              Theorem
        Margin                First_Dynamic
        LatexType             Environment
        LatexName             thm
@@ -34,7 +36,7 @@ Style Theorem
        BottomSep             0.7
        ParSep                0.3
        Align                 Block
-       AlignPossible         Block, Left
+       AlignPossible         Left
        LabelType             Counter
        LabelCounter          theorem
        LabelString           "Theorem \thetheorem."
@@ -47,9 +49,9 @@ Style Theorem
          Series              Bold
        EndFont
        Preamble
-               \theoremstyle{plain}
                \newtheorem{thm}{Theorem}
        EndPreamble
+       Requires              amsthm
 End
 
 
@@ -59,7 +61,6 @@ Style Corollary
        LatexName             cor
        LabelString           "Corollary \thetheorem."
        Preamble
-         \theoremstyle{plain}
          \newtheorem{cor}[thm]{Corollary}
        EndPreamble
 End
@@ -71,7 +72,6 @@ Style Lemma
        LatexName             lem
        LabelString           "Lemma \thetheorem."
        Preamble
-         \theoremstyle{plain}
          \newtheorem{lem}[thm]{Lemma}
        EndPreamble
 End
@@ -83,7 +83,6 @@ Style Proposition
        LatexName             prop
        LabelString           "Proposition \thetheorem."
        Preamble
-         \theoremstyle{plain}
          \newtheorem{prop}[thm]{Proposition}
        EndPreamble
 End
@@ -95,7 +94,6 @@ Style Conjecture
        LatexName             conjecture
        LabelString           "Conjecture \thetheorem."
        Preamble
-         \theoremstyle{plain}
          \newtheorem{conjecture}[thm]{Conjecture}
        EndPreamble
 End
@@ -107,7 +105,6 @@ Style Fact
        LatexName             fact
        LabelString           "Fact \thetheorem."
        Preamble
-         \theoremstyle{plain}
          \newtheorem{fact}[thm]{Fact}
        EndPreamble
 End
@@ -137,9 +134,10 @@ Style Example
        LatexName             example
        LabelString           "Example \thetheorem."
        Preamble
-        \theoremstyle{definition}
+         \theoremstyle{definition}
          \newtheorem{example}[thm]{Example}
        EndPreamble
+       Requires              amsthm
 End
 
 
@@ -151,6 +149,7 @@ Style Problem
          \theoremstyle{definition}
          \newtheorem{problem}[thm]{Problem}
        EndPreamble
+       Requires              amsthm
 End
 
 
@@ -162,6 +161,7 @@ Style Exercise
          \theoremstyle{definition}
          \newtheorem{xca}[thm]{Exercise}
        EndPreamble
+       Requires              amsthm
 End
 
 
@@ -193,6 +193,33 @@ Style Claim
          \theoremstyle{remark}
          \newtheorem{claim}[thm]{Claim}
        EndPreamble
+       Requires              amsthm
 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