]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-named.module
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing...
[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 #Edited by Udi Fogiel
10
11 Format 99
12
13 OutlinerName thm "Definitions & Theorems"
14
15 Style "Named Theorem"
16         CopyStyle Theorem*
17         Category Reasoning
18         Margin                First_Dynamic
19         LabelType             Static
20         AddToToc              thm
21         IsTocCaption          0
22         LatexType             Environment
23         LabelString           ""
24         LatexName             namedthm
25         AddToToc              thm
26         Argument 1
27                 LabelString       "Theorem Title"
28                 Tooltip           "Theorem Title"
29                 AutoInsert            1
30                 IsTocCaption      1
31                 PassThru                  1
32         EndArgument
33         ParIndent             MMM
34         ParSkip               0.4
35         ItemSep               0.2
36         TopSep                0.7
37         BottomSep             0.7
38         ParSep                0.3
39         Align                 Block
40         AlignPossible         Left
41         Font
42             Shape             Italic
43             Size              Normal
44         EndFont
45         LabelFont
46             Shape             Up
47             Series            Bold
48         EndFont
49         Preamble
50                 \newcommand\thmsname\namedthmname
51                 \newtheorem*{namedtheorem}{\protect\thmsname}
52                 \newenvironment{namedthm}[1][]{%
53                         \if\relax\detokenize{#1}\relax
54                                 \begin{namedtheorem}
55                         \else
56                                 \renewcommand\thmsname{#1}%
57                                 \begin{namedtheorem}%
58                         \fi
59                         }{\end{namedtheorem}}
60         EndPreamble
61         LangPreamble
62             \providecommand\namedthmname{_(Theorem)}
63         EndLangPreamble
64         BabelPreamble
65             \addto\captions$$lang{\renewcommand{\namedthmname}{_(Theorem)}}
66         EndBabelPreamble
67         Requires              amsthm
68 End