]> git.lyx.org Git - lyx.git/commitdiff
Add Question and Question* environments to AMS modules. Fixes bug
authorRichard Heck <rgheck@lyx.org>
Wed, 5 Mar 2014 17:31:51 +0000 (12:31 -0500)
committerRichard Heck <rgheck@lyx.org>
Wed, 5 Mar 2014 17:31:51 +0000 (12:31 -0500)
Patch from Paul Rubin.

lib/layouts/theorems-ams-extended-bytype.module
lib/layouts/theorems-refprefix.inc

index b887a21d637ee318d7975bbb4cad829a250aaba0..ea09a7299a26cf94c892fd2526b5f0e90929fffa 100644 (file)
@@ -33,6 +33,7 @@ Requires      amsmath
 # - Acknowledgement
 # - Conclusion
 # - Assumption
+# - Question
 
 # We need separate counters for each theorem-like style.
 Counter criterion
@@ -55,6 +56,8 @@ Counter conclusion
 End
 Counter assumption
 End
+Counter question
+End
 
 
 Style Criterion
@@ -405,4 +408,38 @@ Style Assumption*
        EndBabelPreamble
 End
 
+Style Question
+       CopyStyle             Theorem
+       DependsOn             Theorem
+       LatexName             question
+       LabelString           "Question \thequestion."
+       Preamble
+         \theoremstyle{plain}
+         \newtheorem{question}[thm]{\protect\questionname}
+       EndPreamble
+       LangPreamble
+         \providecommand{\questionname}{_(Question)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
+       EndBabelPreamble
+       LabelCounter          question
+End
+
+Style Question*
+       CopyStyle             Theorem*
+       LatexName             question*
+       LabelString           "Question."
+       Preamble
+         \theoremstyle{plain}
+         \newtheorem*{question*}{\protect\questionname}
+       EndPreamble
+       LangPreamble
+         \providecommand{\questionname}{_(Question)}
+       EndLangPreamble
+       BabelPreamble
+         \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
+       EndBabelPreamble
+End
+
 Input theorems-refprefix.inc
index be67cc0e8368d4f1a612eb01717ac25f27e49227..fea3f193153946d758a415cabbb3d9ddbbd93fa0 100644 (file)
@@ -89,3 +89,8 @@ End
 IfStyle Assumption
        RefPrefix assu
 End
+
+
+IfStyle Question
+       RefPrefix que
+End