Re: Theoreme Enumeration by subsection
Am 17.04.2010 um 23:22 schrieb Paul A. Rubin: > All the theorem-like environments use the counter thm. > > An alternative to the chngcntr package is to create a module to do this. In > LyX's layouts directory, you should have theorems-sec.module. Copy it to > your local layouts directory with the name theorems-subsec.module. Open it > with a plain text editor, change "section" to "subsection" in lines 1, 3, 14 > and 20 and save that. Reconfigure and restart LyX. In your document, go to > Document > Settings > Modules and load either Theorems or Theorems (AMS), > followed by the new Theorems (By Subsection) module. That should do it. > > /Paul That's a nice explanation. Thank you very much. Kind regards, iustifico
Re: Theoreme Enumeration by subsection
Am 17.04.2010 um 23:04 schrieb rgheck: > The counters are shared with theorem, lemma, etc. I think what you want is: >\counterwithin{thm}{subsection} Thank you very much, this is exactly the way I needed it to work. Regards, iustifico
Re: Theoreme Enumeration by subsection
On 4/17/2010 4:42 PM, iustifico wrote: When I do \usepackage{chngcntr} \counterwithin{definition}{subsection} in the preamble of Lyx, it tells me definition is not a counter. I assume, that e.g. propositions or definitions have a "counter variable". But how do I get their names? Kind regards, iustifico All the theorem-like environments use the counter thm. An alternative to the chngcntr package is to create a module to do this. In LyX's layouts directory, you should have theorems-sec.module. Copy it to your local layouts directory with the name theorems-subsec.module. Open it with a plain text editor, change "section" to "subsection" in lines 1, 3, 14 and 20 and save that. Reconfigure and restart LyX. In your document, go to Document > Settings > Modules and load either Theorems or Theorems (AMS), followed by the new Theorems (By Subsection) module. That should do it. /Paul
Re: Theoreme Enumeration by subsection
On 04/17/2010 04:42 PM, iustifico wrote: Am 17.04.2010 um 20:45 schrieb Philiрp Rеichmuth: Am Sat, 17 Apr 2010 19:54:05 +0200 schrieb iustifico: I am using "book (KOMA-script)" as documentclass and I want to enumerate my propositions, definitions etc. by subsection, like this: I. Section I.1 Subsection Definition I.1.1 Proposition I.1.2 You can use the chngcntr package to control which counters get reset when and where. For example in my preamble I use \usepackage{chngcntr} \counterwithout{footnote}{chapter} for continuous numbering of footnotes across chapter boundaries. So you could use something like \counterwithin*{defn}{subsection} etc., substituting "defn" for the names of all the environments whose counter you want to redefine. When I do \usepackage{chngcntr} \counterwithin{definition}{subsection} in the preamble of Lyx, it tells me definition is not a counter. I assume, that e.g. propositions or definitions have a "counter variable". But how do I get their names? The counters are shared with theorem, lemma, etc. I think what you want is: \counterwithin{thm}{subsection} See the theorems-std.inc or theorems-ams.inc file for how the theorem environments are defined. By the way, I don't know why it didn't occur to me before, but the attached is a module for this. It's the obvious adaptation of the the "Theorems by Section" module. Put it in your LyX user directory (e.g., ~/.lyx/layouts/ on Linux), reconfigure LyX, and it will appear under Document>Settings>Modules. Select it, and your theorems will be numbered by subsection. Richard #\DeclareLyXModule{Theorems (Numbered by Subsection)} #DescriptionBegin #Numbers theorems and the like by subsection (i.e., the counter is reset at #each subsection start). #DescriptionEnd #Requires: theorems-std | theorems-ams #Excludes: theorems-chap theorems-sec # Author: Richard Heck # Tweaked by Paul Rubin June '09 (added theoremstyle) Format 11 Counter theorem Within subsection End Style Theorem Preamble \theoremstyle{plain} \newtheorem{thm}{Theorem}[subsection] EndPreamble End
Re: Theoreme Enumeration by subsection
Am 17.04.2010 um 20:45 schrieb Philiрp Rеichmuth: > Am Sat, 17 Apr 2010 19:54:05 +0200 schrieb iustifico: >> I am using "book (KOMA-script)" as documentclass and I want to >> enumerate my propositions, definitions etc. by subsection, like this: >> >> I. Section >>I.1 Subsection >>Definition I.1.1 >>Proposition I.1.2 > > You can use the chngcntr package to control which counters get reset when > and where. For example in my preamble I use > > \usepackage{chngcntr} > \counterwithout{footnote}{chapter} > > for continuous numbering of footnotes across chapter boundaries. > > So you could use something like \counterwithin*{defn}{subsection} etc., > substituting "defn" for the names of all the environments whose counter you > want to redefine. When I do \usepackage{chngcntr} \counterwithin{definition}{subsection} in the preamble of Lyx, it tells me definition is not a counter. I assume, that e.g. propositions or definitions have a "counter variable". But how do I get their names? Kind regards, iustifico
Re: Theoreme Enumeration by subsection
On 04/17/2010 02:45 PM, Philiрp Rеichmuth wrote: Am Sat, 17 Apr 2010 19:54:05 +0200 schrieb iustifico: I am using "book (KOMA-script)" as documentclass and I want to enumerate my propositions, definitions etc. by subsection, like this: I. Section I.1 Subsection Definition I.1.1 Proposition I.1.2 You can use the chngcntr package to control which counters get reset when and where. Good suggestion. The koma-script packages may have options to control this, too, but I don't know. Check the koma-script documentation. rh
Re: Theoreme Enumeration by subsection
Am Sat, 17 Apr 2010 19:54:05 +0200 schrieb iustifico: > I am using "book (KOMA-script)" as documentclass and I want to > enumerate my propositions, definitions etc. by subsection, like this: > > I. Section > I.1 Subsection > Definition I.1.1 > Proposition I.1.2 You can use the chngcntr package to control which counters get reset when and where. For example in my preamble I use \usepackage{chngcntr} \counterwithout{footnote}{chapter} for continuous numbering of footnotes across chapter boundaries. So you could use something like \counterwithin*{defn}{subsection} etc., substituting "defn" for the names of all the environments whose counter you want to redefine. Philipp
Theoreme Enumeration by subsection
I am using "book (KOMA-script)" as documentclass and I want to enumerate my propositions, definitions etc. by subsection, like this: I. Section I.1 Subsection Definition I.1.1 Proposition I.1.2 I.2 Subsection Proposition I.2.1 Definition I.2.2 II Section II.1 Subsection Definition II.1.1 Proposition II.1.2 I.2 Subsection Proposition II.2.1 Definition II.2.2 Second one: How do I change the style. At the moment lyx enumerates the definitions and propositions by section. That is not what I need... Is this possible? If yes, how do I tell lyx, to do so? Thank you for your help. Kind regards, iustifico