]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-named.module
Update layouts
[lyx.git] / lib / layouts / theorems-named.module
1 #% Do not delete the line below; configure depends on this
2 #\DeclareLyXModule{Standard Theorems (Nameable)}
3 #\DeclareCategory{Maths}
4 #DescriptionBegin
5 # Facilitates the use of named theorems. The name of the theorem
6 # goes into the 'Additional Theorem Text' argument.
7 #DescriptionEnd
8 #Original Author: John Perry
9
10 Format 84
11
12 ProvideStyle Theorem*
13         Category              Reasoning
14         LatexType             Environment
15         Margin                First_Dynamic
16         LatexName             thm*
17         LabelType             Static
18         LabelString           "Theorem."
19         NextNoIndent          1
20         ResetArgs             1
21         Argument 1
22                 LabelString    "Additional Theorem Text"
23                 Tooltip        "Additional text appended to the theorem header"
24         EndArgument
25         LabelSep              xx
26         ParIndent             MMM
27         ParSkip               0.4
28         ItemSep               0.2
29         TopSep                0.7
30         BottomSep             0.7
31         ParSep                0.3
32         Align                 Block
33         AlignPossible         Left
34         Font
35           Shape               Italic
36           Size                Normal
37         EndFont
38         LabelFont
39           Shape               Up
40           Series              Bold
41         EndFont
42         Preamble
43           \theoremstyle{plain}
44           \newtheorem*{thm*}{\protect\theoremname}
45         EndPreamble
46         LangPreamble
47           \providecommand{\theoremname}{_(Theorem)}
48         EndLangPreamble
49         BabelPreamble
50           \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
51         EndBabelPreamble
52         Requires              amsthm
53 End
54
55
56 Style "Named Theorem"
57   CopyStyle Theorem*
58   Category Reasoning
59   LabelString "Named Theorem."
60   LatexName namedthm
61   Preamble
62     \newcommand\thmsname{\protect\theoremname}
63     \newcommand\nm@thmtype{theorem}
64     \theoremstyle{plain}
65     \newtheorem*{namedtheorem}{\thmsname}
66     \newenvironment{namedthm}[1][Undefined Theorem Name]{
67       \ifx{#1}{Undefined Theorem Name}\renewcommand\nm@thmtype{theorem*}
68       \else\renewcommand\thmsname{#1}\renewcommand\nm@thmtype{namedtheorem}
69       \fi
70       \begin{\nm@thmtype}}
71       {\end{\nm@thmtype}}
72   EndPreamble
73 End
74