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 <rgh...@comcast.net>
# Tweaked by Paul Rubin <ru...@msu.edu> June '09 (added theoremstyle)
Format 11
Counter theorem
Within subsection
End
Style Theorem
Preamble
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[subsection]
EndPreamble
End