X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flayouts%2Ftheorems-named.module;h=3a874b255eecbbb3427b982f88eafabf53664bdd;hb=42c2a25fb873727d87ce753b3a3ac4e913e36fe0;hp=3e9b1eec887de49745ca240967e053561b749129;hpb=6b49b6b129af9417fea7ea907a44a46fbbd38340;p=lyx.git diff --git a/lib/layouts/theorems-named.module b/lib/layouts/theorems-named.module index 3e9b1eec88..3a874b255e 100644 --- a/lib/layouts/theorems-named.module +++ b/lib/layouts/theorems-named.module @@ -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 49 Style "Named Theorem" - CopyStyle Theorem* - Category Reasoning - 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 -