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


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
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:
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.


#\DeclareLyXModule{Theorems (Numbered by Subsection)}
#Numbers theorems and the like by subsection (i.e., the counter is reset at
#each subsection start).
#Requires: theorems-std | theorems-ams
#Excludes: theorems-chap theorems-sec

# Author: Richard Heck <rgh...@comcast.net>
# Tweaked by Paul Rubin <ru...@msu.edu> June '09 (added theoremstyle)

Format 11

Counter theorem
        Within         subsection

Style Theorem

Reply via email to