On Saturday 21 September 2002 19:00, Dekel Tsur wrote: > On Sat, Sep 21, 2002 at 06:33:37PM +0200, Pascal Francq wrote: > > I am using the algorithm package. In the preamble of my LyX document, I > > have inserted "\usepackage[chapter]{algorithm}". When I insert an > > algorithm trough > > LyX 1.2.x does not use the algorithm package. > > > 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}
It works, but there problems when using with the hyperref package. On the LyX website, it is explain to add in the preamble something like: \newcommand{\theHalgorithm}{\thechapter.\arabic{algorithm}} But, when doing this, I have the linear numerotation and if I use your system, it works but I have got an error. I Suppose there must be some 'trick' to combine both? -- Ir Pascal Francq Researcher Université Libre de Bruxelles CAD/CAM Department Avenue F.D. Roosevelt, 50 CP 165/14 B-1050 Brussels BELGIUM Tel. +32-2-650 47 65 Fax +32-2-650 47 24 ICQ: 91206668