]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-named.module
Bump layout format
[lyx.git] / lib / layouts / theorems-named.module
1 #% Do not delete the line below; configure depends on this
2 #\DeclareLyXModule{Named Theorems}
3 #DescriptionBegin
4 # Facilitates the use of named theorems. The name of the theorem
5 # goes into the 'Short Title' inset.
6 #DescriptionEnd
7 #Requires: theorems-ams | theorems-starred
8 #Original Author: John Perry
9
10 Format 42
11 Style "Named Theorem"
12   CopyStyle Theorem*
13   Category Theorem
14   LabelString "Named Theorem."
15   LatexName namedthm
16   Preamble
17     \newcommand\thmsname{\protect\theoremname}
18     \newcommand\nm@thmtype{theorem}
19     \theoremstyle{plain}
20     \newtheorem*{namedtheorem}{\thmsname}
21     \newenvironment{namedthm}[1][Undefined Theorem Name]{
22       \ifx{#1}{Undefined Theorem Name}\renewcommand\nm@thmtype{theorem*}
23       \else\renewcommand\thmsname{#1}\renewcommand\nm@thmtype{namedtheorem}
24       \fi
25       \begin{\nm@thmtype}}
26       {\end{\nm@thmtype}}
27   EndPreamble
28 End
29