]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/theorems-named.module
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing...
[lyx.git] / lib / layouts / theorems-named.module
index 899dba1b5cd1e050e014ba5230a6faad3ab6a2e1..3a874b255eecbbb3427b982f88eafabf53664bdd 100644 (file)
@@ -1,29 +1,68 @@
 #% Do not delete the line below; configure depends on this
-#\DeclareLyXModule{Named Theorems}
+#\DeclareLyXModule{Standard Theorems (Nameable)}
+#\DeclareCategory{Maths}
 #DescriptionBegin
 # Facilitates the use of named theorems. The name of the theorem
-# goes into the 'Short Title' inset.
+# goes into the 'Additional Theorem Text' argument.
 #DescriptionEnd
-#Requires: theorems-ams | theorems-starred
 #Original Author: John Perry
+#Edited by Udi Fogiel
+
+Format 99
+
+OutlinerName thm "Definitions & Theorems"
 
-Format 40
 Style "Named Theorem"
-  CopyStyle Theorem*
-  Category Theorem
-  LabelString "Named Theorem."
-  LatexName namedthm
-  Preamble
-    \newcommand\thmsname{\protect\theoremname}
-    \newcommand\nm@thmtype{theorem}
-    \theoremstyle{plain}
-    \newtheorem*{namedtheorem}{\thmsname}
-    \newenvironment{namedthm}[1][Undefined Theorem Name]{
-      \ifx{#1}{Undefined Theorem Name}\renewcommand\nm@thmtype{theorem*}
-      \else\renewcommand\thmsname{#1}\renewcommand\nm@thmtype{namedtheorem}
-      \fi
-      \begin{\nm@thmtype}}
-      {\end{\nm@thmtype}}
-  EndPreamble
+       CopyStyle Theorem*
+       Category Reasoning
+       Margin                First_Dynamic
+       LabelType             Static
+       AddToToc              thm
+       IsTocCaption          0
+       LatexType             Environment
+       LabelString           ""
+       LatexName             namedthm
+       AddToToc              thm
+       Argument 1
+               LabelString       "Theorem Title"
+               Tooltip           "Theorem Title"
+               AutoInsert            1
+               IsTocCaption      1
+               PassThru                  1
+       EndArgument
+       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
+               \newcommand\thmsname\namedthmname
+               \newtheorem*{namedtheorem}{\protect\thmsname}
+               \newenvironment{namedthm}[1][]{%
+                       \if\relax\detokenize{#1}\relax
+                               \begin{namedtheorem}
+                       \else
+                               \renewcommand\thmsname{#1}%
+                               \begin{namedtheorem}%
+                       \fi
+                       }{\end{namedtheorem}}
+       EndPreamble
+       LangPreamble
+           \providecommand\namedthmname{_(Theorem)}
+       EndLangPreamble
+       BabelPreamble
+           \addto\captions$$lang{\renewcommand{\namedthmname}{_(Theorem)}}
+       EndBabelPreamble
+       Requires              amsthm
 End
-