On Sat, Sep 21, 2002 at 01:36:27PM -0700, Peter Harkins wrote:
> On Sat, Sep 21, 2002 at 08:00:10PM +0300, Dekel Tsur wrote:
> > > the corresponding float menu in LyX, the algorithm numerotation is global 
> > > (1,2,3, ...) rather chapter specific (1.1,1.2,2.1,....).
> > > Any ideas?
> > 
> > Add to the preamble:
> > 
> > \renewcommand{\thealgorithm}{\thechapter.\arabic{algorithm}}
> > \@addtoreset{algorithm}{chapter}
> 
>       I was able to use this as follows to fix a problem I was having, but
> is there a way to make it reset to -1 so my sections will be numbered from 0
> up?

Assuming you dont use the optional argument to \chapter:

\let\mychapter=\chapter
\def\chapter{\@ifstar\starchapter\ordchapter}
\def\starchapter#1{\mychapter*{#1}}
\def\ordchapter#1{\mychapter{#1}\setcounter{section}{-1}}

Reply via email to