]> git.lyx.org Git - features.git/commitdiff
Fix bug #11741.
authorDaniel Ramoeller <d.lyx@web.de>
Sun, 9 Aug 2020 17:09:41 +0000 (13:09 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 9 Aug 2020 17:35:02 +0000 (13:35 -0400)
Theorems weren't being numbered by chapter.

(cherry picked from commit e6de6c2b596d1554c4489a00cb82416010ae91c1)

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

index 8b27b58a5f21f5816cf3ff289edafb50f6199c84..9fa0638da99d0e231f70383dfb7c691f881858e2 100644 (file)
@@ -21,34 +21,6 @@ Format 66
 
 Requires       amsmath,amsthm
 
-# We need separate counters for each theorem-like style.
-Counter theorem
-End
-Counter corollary
-End
-Counter lemma
-End
-Counter proposition
-End
-Counter conjecture
-End
-Counter fact
-End
-Counter definition
-End
-Counter example
-End
-Counter solution
-End
-Counter problem
-End
-Counter exercise
-End
-Counter remark
-End
-Counter claim
-End
-
 Input theorems-order.inc
 Input theorems-ams-bytype.inc
 Input theorems-starred.inc
index 5af0450e42efa388f5df6d2e24357a3cae4e8f0d..9c01e2e8129d85d748abfc55e140686f23988579 100644 (file)
 
 # We need separate counters for each theorem-like style.
 Format 66
+
 Counter theorem
+       GuiName Theorem
+       Within         chapter
 End
 Counter corollary
+       GuiName Corollary
+       Within         chapter
 End
 Counter lemma
+       GuiName Lemma
+       Within         chapter
 End
 Counter proposition
+       GuiName Proposition
+       Within         chapter
 End
 Counter conjecture
+       GuiName Conjecture
+       Within         chapter
 End
 Counter fact
+       GuiName Fact
+       Within         chapter
 End
 Counter definition
+       GuiName Definition
+       Within         chapter
 End
 Counter example
+       GuiName Example
+       Within         chapter
 End
 Counter problem
+       GuiName Problem
+       Within         chapter
 End
 Counter exercise
+       GuiName Exercise
+       Within         chapter
 End
 Counter solution
+       GuiName Solution
+       Within         chapter
 End
 Counter remark
+       GuiName Remark
+       Within         chapter
 End
 Counter claim
+       GuiName Claim
+       Within         chapter
 End
 
 OutlinerName thm "Definitions & Theorems"
@@ -79,7 +106,7 @@ Style Theorem
        AlignPossible         Left
        LabelType             Static
        LabelCounter          theorem
-       LabelString           "Theorem \thechapter.\thetheorem."
+       LabelString           "Theorem \thetheorem."
        Font
          Shape               Italic
          Size                Normal
@@ -109,7 +136,7 @@ End
 Style Corollary
        CopyStyle             Theorem
        LatexName             cor
-       LabelString           "Corollary \thechapter.\thecorollary."
+       LabelString           "Corollary \thecorollary."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -131,7 +158,7 @@ End
 Style Lemma
        CopyStyle             Theorem
        LatexName             lem
-       LabelString           "Lemma \thechapter.\thelemma."
+       LabelString           "Lemma \thelemma."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -153,7 +180,7 @@ End
 Style Proposition
        CopyStyle             Theorem
        LatexName             prop
-       LabelString           "Proposition \thechapter.\theproposition."
+       LabelString           "Proposition \theproposition."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -175,7 +202,7 @@ End
 Style Conjecture
        CopyStyle             Theorem
        LatexName             conjecture
-       LabelString           "Conjecture \thechapter.\theconjecture."
+       LabelString           "Conjecture \theconjecture."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -197,7 +224,7 @@ End
 Style Fact
        CopyStyle             Theorem
        LatexName             fact
-       LabelString           "Fact \thechapter.\thefact."
+       LabelString           "Fact \thefact."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -219,7 +246,7 @@ End
 Style Definition
        CopyStyle             Theorem
        LatexName             defn
-       LabelString           "Definition \thechapter.\thedefinition."
+       LabelString           "Definition \thedefinition."
        Font
          Shape               Up
        EndFont
@@ -248,7 +275,7 @@ End
 Style Example
        CopyStyle             Definition
        LatexName             example
-       LabelString           "Example \thechapter.\theexample."
+       LabelString           "Example \theexample."
        Preamble
          \theoremstyle{definition}
     \ifx\thechapter\undefined
@@ -271,7 +298,7 @@ End
 Style Problem
        CopyStyle             Definition
        LatexName             problem
-       LabelString           "Problem \thechapter.\theproblem."
+       LabelString           "Problem \theproblem."
        Preamble
          \theoremstyle{definition}
     \ifx\thechapter\undefined
@@ -294,7 +321,7 @@ End
 Style Exercise
        CopyStyle             Definition
        LatexName             xca
-       LabelString           "Exercise \thechapter.\theexercise."
+       LabelString           "Exercise \theexercise."
        Preamble
          \theoremstyle{definition}
     \ifx\thechapter\undefined
@@ -317,7 +344,7 @@ End
 Style Solution
        CopyStyle             Definition
        LatexName             sol
-       LabelString           "Solution \thechapter.\thesolution."
+       LabelString           "Solution \thesolution."
        Preamble
          \theoremstyle{definition}
     \ifx\thechapter\undefined
@@ -340,7 +367,7 @@ End
 Style Remark
        CopyStyle             Theorem
        LatexName             rem
-       LabelString           "Remark \thechapter.\theremark."
+       LabelString           "Remark \theremark."
        Font
          Shape               Up
          Size                Normal
@@ -370,7 +397,7 @@ End
 Style Claim
        CopyStyle             Remark
        LatexName             claim
-       LabelString           "Claim \thechapter.\theclaim."
+       LabelString           "Claim \theclaim."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
index 475fe9939b45535b32eef6cf44f7b63a9a35bc76..63f9c0176878dbda4b897ec2466297f38beb3526 100644 (file)
@@ -22,50 +22,6 @@ Format 66
 
 Requires       amsmath,amsthm
 
-# The environments defined (regular and starred) are :
-# - theorem
-# - corollary
-# - lemma
-# - proposition
-# - conjecture
-# - fact
-# - definition
-# - example
-# - solution
-# - problem
-# - exercise
-# - remark
-# - claim
-
-# We need separate counters for each theorem-like style.
-Counter theorem
-End
-Counter corollary
-End
-Counter lemma
-End
-Counter proposition
-End
-Counter conjecture
-End
-Counter fact
-End
-Counter definition
-End
-Counter example
-End
-Counter solution
-End
-Counter problem
-End
-Counter exercise
-End
-Counter remark
-End
-Counter claim
-End
-
-
 Input theorems-order.inc
 Input theorems-ams-chap-bytype.inc
 Input theorems-starred.inc
index f389ef90f3e0f3ed4c0e6f9a118183c9aeeb1b86..634e79a67a03ffb7a9c1a10b65da6c19cd3ad29d 100644 (file)
@@ -44,20 +44,48 @@ End
 Counter axiom
 End
 Counter condition
+       GuiName Criterion
+       Within         chapter
+End
+Counter algorithm
+       GuiName Algorithm
+       Within         chapter
+End
+Counter axiom
+       GuiName Axiom
+       Within         chapter
+End
+Counter condition
+       GuiName Condition
+       Within         chapter
 End
 Counter note
+       GuiName Note
+       Within         chapter
 End
 Counter notation
+       GuiName Notation
+       Within         chapter
 End
 Counter summary
+       GuiName Summary
+       Within         chapter
 End
 Counter acknowledgement
+       GuiName Acknowledgement
+       Within         chapter
 End
 Counter conclusion
+       GuiName Conclusion
+       Within         chapter
 End
 Counter assumption
+       GuiName Assumption
+       Within         chapter
 End
 Counter question
+       GuiName Question
+       Within         chapter
 End
 
 
@@ -66,7 +94,7 @@ End
 Style Criterion
        CopyStyle             Theorem
        LatexName             criterion
-       LabelString           "Criterion \thechapter.\thecriterion."
+       LabelString           "Criterion \thecriterion."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -105,7 +133,7 @@ End
 Style Algorithm
        CopyStyle             Theorem
        LatexName             lyxalgorithm
-       LabelString           "Algorithm \thechapter.\thealgorithm."
+       LabelString           "Algorithm \thealgorithm."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -144,7 +172,7 @@ End
 Style Axiom
        CopyStyle             Theorem
        LatexName             ax
-       LabelString           "Axiom \thechapter.\theaxiom."
+       LabelString           "Axiom \theaxiom."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -183,7 +211,7 @@ End
 Style Condition
        CopyStyle             Definition
        LatexName             condition
-       LabelString           "Condition \thechapter.\thecondition."
+       LabelString           "Condition \thecondition."
        Preamble
          \theoremstyle{definition}
     \ifx\thechapter\undefined
@@ -222,7 +250,7 @@ End
 Style Note
        CopyStyle             Remark
        LatexName             note
-       LabelString           "Note \thechapter.\thenote."
+       LabelString           "Note \thenote."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
@@ -261,7 +289,7 @@ End
 Style Notation
        CopyStyle             Remark
        LatexName             notation
-       LabelString           "Notation \thechapter.\thenotation."
+       LabelString           "Notation \thenotation."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
@@ -300,7 +328,7 @@ End
 Style Summary
        CopyStyle             Remark
        LatexName             summary
-       LabelString           "Summary \thechapter.\thesummary."
+       LabelString           "Summary \thesummary."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
@@ -340,7 +368,7 @@ End
 Style Acknowledgement
        CopyStyle             Remark
        LatexName             acknowledgement
-       LabelString           "Acknowledgement \thechapter.\theacknowledgement."
+       LabelString           "Acknowledgement \theacknowledgement."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
@@ -379,7 +407,7 @@ End
 Style Conclusion
        CopyStyle             Remark
        LatexName             conclusion
-       LabelString           "Conclusion \thechapter.\theconclusion."
+       LabelString           "Conclusion \theconclusion."
        Preamble
          \theoremstyle{remark}
     \ifx\thechapter\undefined
@@ -418,7 +446,7 @@ End
 Style Assumption
        CopyStyle             Theorem
        LatexName             assumption
-       LabelString           "Assumption \thechapter.\theassumption."
+       LabelString           "Assumption \theassumption."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined
@@ -457,7 +485,7 @@ Style Question
        CopyStyle             Theorem
        DependsOn             Theorem
        LatexName             question
-       LabelString           "Question \thechapter.\thequestion."
+       LabelString           "Question \thequestion."
        Preamble
          \theoremstyle{plain}
     \ifx\thechapter\undefined