[Tugindia] numbering within subsection or section

Manjusha Joshi msj at bprim.org
Mon Jul 18 14:46:11 CEST 2005


Hi,

I am using command 

\numberwithin{algorithm}{subsection}
Which numbers algorithms subsection wise. e.g. 4.9.3.1
i.e. chapter 4, section 9, subsection 3, and algorithm 1 in that subsection.
Up to this fine every thing is fine.
But some times there are no subsections, and only sections and algorithms are 
there in the section then it numbers the algorithm like 4.7.0.2  i.e. second  
algorithm in chap 4 in section 7 and in subsection 0 , which I want to avoid. 
When ever there is section I want numbering like 4.9.3.1. but in absence of 
subsection I would like to have numbering like 4.7.1.
Is it possible? Am I expecting any illogical numbering?

Thanks,
Manjusha



More information about the tugindia mailing list