[Tugindia] numbering within subsection or section

CV Radhakrishnan cvr at river-valley.com
Mon Jul 18 15:20:26 CEST 2005


On Mon, July 18, 2005 6:16 pm, Manjusha Joshi said:
> 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?

I don't think it is possible with default setup, you might need to write
special macros for it.

> Am I expecting any illogical numbering?

Yes indeed.

-- 
Radhakrishnan



More information about the tugindia mailing list