]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-chap.module
Allow literate documents other than noweb to work out of the box. Currently
[lyx.git] / lib / layouts / theorems-chap.module
1 #\DeclareLyXModule{Theorems (By Chapter)}
2 #DescriptionBegin
3 #Numbers theorems and the like by chapter. Use this module only with
4 #layouts that provide a chapter environment.
5 #DescriptionEnd
6 #Requires: theorems-std | theorems-ams
7 #Excludes: theorems-sec
8
9 # Author: Richard Heck <rgheck@comcast.net>
10
11 Format 14
12
13 Counter theorem
14         Within         chapter
15 End
16
17 Style Theorem
18         Preamble
19                 \ifx\thechapter\undefined
20                         \newtheorem{thm}{\protect\theoremname}
21                 \else
22                         \newtheorem{thm}{\protect\theoremname}[chapter]
23                 \fi
24         EndPreamble
25         LangPreamble
26                 \providecommand{\theoremname}{_(Theorem)}
27         EndLangPreamble
28         BabelPreamble
29                 \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
30         EndBabelPreamble
31 End