]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/theorems-ams-bytype.inc
Update covington support in linguistics module (file format change)
[lyx.git] / lib / layouts / theorems-ams-bytype.inc
index 2a1fdbd2bb5832ceed6b9054a38ac37d705c6754..1aefb1565f92f530fd96a69345dce3bcae50199e 100644 (file)
@@ -2,10 +2,10 @@
 # Probably broken by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
 # modified and modularized by Emmanuel GUREGHIAN <gureghia@boston.bertin.fr>
 # Tinkered with Sep. '07 by Paul Rubin <rubin@msu.edu>
-# Modularized Jan 08 by Richard Heck <rgheck@comcast.net>
+# Modularized Jan 08 by Richard Kimberly Heck <rikiheck@lyx.org>
 # Hacked June '09 by Paul Rubin <rubin@msu.edu> to use separate counters
 
-# The environnements defined are :
+# The environments defined are :
 # - Theorem
 # - Corollary
 # - Lemma
 # - Example
 # - Problem
 # - Exercise
+# - Solution
 # - Remark
 # - Claim
-# - Case (regular only -- defined as an enumeration)
+# - Case (by inclusion)
 
-# We need separate counters for each theorem-like style.
-Format 22
-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 100
 
-Format 11
+Input theorems-counters-bytype.inc
+
+OutlinerName thm "Definitions & Theorems"
 
 Style Theorem
-       Category              Theorem
+       Category              Reasoning
        Margin                First_Dynamic
        LatexType             Environment
        LatexName             thm
        NextNoIndent          1
-       OptionalArgs          1
+       ResetArgs             1
+       AddToToc              thm
+       IsTocCaption          1
+       Argument 1
+               LabelString    "Additional Theorem Text"
+               Tooltip        "Additional text appended to the theorem header"
+               IsTocCaption      1
+       EndArgument
        LabelSep              xx
        ParIndent             MMM
        ParSkip               0.4
@@ -65,7 +50,7 @@ Style Theorem
        ParSep                0.3
        Align                 Block
        AlignPossible         Left
-       LabelType             Counter
+       LabelType             Static
        LabelCounter          theorem
        LabelString           "Theorem \thetheorem."
        Font
@@ -78,9 +63,20 @@ Style Theorem
        EndFont
        Preamble
                \theoremstyle{plain}
-               \newtheorem{thm}{Theorem}
+               \newtheorem{thm}{\protect\theoremname}
        EndPreamble
+       LangPreamble
+               \providecommand{\theoremname}{_(Theorem)}
+       EndLangPreamble
+       BabelPreamble
+               \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
+       EndBabelPreamble
        Requires              amsthm
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='theorem'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -90,9 +86,20 @@ Style Corollary
        LabelString           "Corollary \thecorollary."
        Preamble
          \theoremstyle{plain}
-         \newtheorem{cor}{Corollary}
+         \newtheorem{cor}{\protect\corollaryname}
        EndPreamble
        LabelCounter          corollary
+       LangPreamble
+               \providecommand{\corollaryname}{_(Corollary)}
+       EndLangPreamble
+       BabelPreamble
+               \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}
+       EndBabelPreamble
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='corollary'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -102,9 +109,20 @@ Style Lemma
        LabelString           "Lemma \thelemma."
        Preamble
          \theoremstyle{plain}
-         \newtheorem{lem}{Lemma}
+         \newtheorem{lem}{\protect\lemmaname}
        EndPreamble
+       LangPreamble
+         \providecommand{\lemmaname}{_(Lemma)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}
+       EndBabelPreamble
        LabelCounter          lemma
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='lemma'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -114,9 +132,20 @@ Style Proposition
        LabelString           "Proposition \theproposition."
        Preamble
          \theoremstyle{plain}
-         \newtheorem{prop}{Proposition}
+         \newtheorem{prop}{\protect\propositionname}
        EndPreamble
+       LangPreamble
+         \providecommand{\propositionname}{_(Proposition)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}
+       EndBabelPreamble
        LabelCounter          proposition
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='proposition'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -126,9 +155,20 @@ Style Conjecture
        LabelString           "Conjecture \theconjecture."
        Preamble
          \theoremstyle{plain}
-         \newtheorem{conjecture}{Conjecture}
+         \newtheorem{conjecture}{\protect\conjecturename}
        EndPreamble
+       LangPreamble
+         \providecommand{\conjecturename}{_(Conjecture)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}}
+       EndBabelPreamble
        LabelCounter          conjecture
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='conjecture'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -138,9 +178,20 @@ Style Fact
        LabelString           "Fact \thefact."
        Preamble
          \theoremstyle{plain}
-         \newtheorem{fact}{Fact}
+         \newtheorem{fact}{\protect\factname}
        EndPreamble
+       LangPreamble
+         \providecommand{\factname}{_(Fact)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}
+       EndBabelPreamble
        LabelCounter          fact
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='fact'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -157,9 +208,20 @@ Style Definition
        EndFont
        Preamble
          \theoremstyle{definition}
-         \newtheorem{defn}{Definition}
+         \newtheorem{defn}{\protect\definitionname}
        EndPreamble
+       LangPreamble
+         \providecommand{\definitionname}{_(Definition)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}}
+       EndBabelPreamble
        LabelCounter          definition
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='definition'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -169,10 +231,19 @@ Style Example
        LabelString           "Example \theexample."
        Preamble
         \theoremstyle{definition}
-         \newtheorem{example}{Example}
+         \newtheorem{example}{\protect\examplename}
        EndPreamble
        Requires              amsthm
+       LangPreamble
+         \providecommand{\examplename}{_(Example)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}}
+       EndBabelPreamble
        LabelCounter          example
+       DocBookWrapperTag     informalexample
+       DocBookTag            para
+       DocBookAttr           ""
 End
 
 
@@ -182,10 +253,21 @@ Style Problem
        LabelString           "Problem \theproblem."
        Preamble
          \theoremstyle{definition}
-         \newtheorem{problem}{Problem}
+         \newtheorem{problem}{\protect\problemname}
        EndPreamble
        Requires              amsthm
+       LangPreamble
+         \providecommand{\problemname}{_(Problem)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}}
+       EndBabelPreamble
        LabelCounter          problem
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='problem'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -195,10 +277,45 @@ Style Exercise
        LabelString           "Exercise \theexercise."
        Preamble
          \theoremstyle{definition}
-         \newtheorem{xca}{Exercise}
+         \newtheorem{xca}{\protect\exercisename}
        EndPreamble
        Requires              amsthm
+       LangPreamble
+         \providecommand{\exercisename}{_(Exercise)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}}
+       EndBabelPreamble
        LabelCounter          exercise
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='exercise'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
+End
+
+
+Style Solution
+       CopyStyle             Definition
+       LatexName             sol
+       LabelString           "Solution \thesolution."
+       Preamble
+         \theoremstyle{definition}
+         \newtheorem{sol}{\protect\solutionname}
+       EndPreamble
+       Requires              amsthm
+       LangPreamble
+               \providecommand{\solutionname}{_(Solution)}
+       EndLangPreamble
+       BabelPreamble
+               \addto\captions$$lang{\renewcommand{\solutionname}{_(Solution)}}
+       EndBabelPreamble
+       LabelCounter          solution
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='solution'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -216,9 +333,20 @@ Style Remark
        EndFont
        Preamble
          \theoremstyle{remark}
-         \newtheorem{rem}{Remark}
+         \newtheorem{rem}{\protect\remarkname}
        EndPreamble
+       LangPreamble
+         \providecommand{\remarkname}{_(Remark)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}}
+       EndBabelPreamble
        LabelCounter          remark
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='remark'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
 
@@ -228,46 +356,21 @@ Style Claim
        LabelString           "Claim \theclaim."
        Preamble
          \theoremstyle{remark}
-         \newtheorem{claim}{Claim}
+         \newtheorem{claim}{\protect\claimname}
        EndPreamble
        Requires              amsthm
+       LangPreamble
+         \providecommand{\claimname}{_(Claim)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}}
+       EndBabelPreamble
        LabelCounter          claim
+       DocBookWrapperTag     figure
+       DocBookWrapperAttr    role='claim'
+       DocBookTag            para
+       DocBookGenerateTitle  true
+       DocBookWrapperMergeWithPrevious  true
 End
 
-
-# Define Case as an enumeration environment
-Style Case
-       Category              Theorem
-       Margin                Static
-       LatexType             Item_Environment
-       LatexName             caseenv
-       LabelType             Itemize
-       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
+Input theorems-case.inc