W3C home > Mailing lists > Public > www-style@w3.org > June 2014

Re: [css-gcpm] Idea for example 18

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 12 Jun 2014 14:00:22 -0700
Message-ID: <CAAWBYDBJsNB=R+ZUpvH=oHJtBrf_hSm67Tx89zxLFoQj7XgVwQ@mail.gmail.com>
To: Dave Cramer <dauwhe@gmail.com>
Cc: Jirka Kosek <jirka@kosek.cz>, W3C Style <www-style@w3.org>
On Thu, Jun 12, 2014 at 1:48 PM, Dave Cramer <dauwhe@gmail.com> wrote:
> On Thu, Jun 12, 2014 at 12:46 PM, Jirka Kosek <jirka@kosek.cz> wrote:
>>
>>
>> if I understand it correctly target-counters() should be able to
>> generate multilevel numbers -- like 4.2.3.5. This numbering is usual in
>> technical documentation and some academic papers, so example can show
>> several nested <section> elements with headings.
>>
>
> I haven't seen an example where counters() can be used to do multilevel
> section numbering, since the headings themselves aren't nested. This is
> usually done with more than one counter().
>
> target-counters() could be used to create a reference to the numbering
> inside a multilevel list, which can use counters(). I'll keep trying to
> think of a semi-realistic example for that.

If you're using nested sections, you can set the counters on the
sections themselves, rather than the headings.  That way you get the
nesting structure automatically, without having to do the six
separately-managed counters.

~TJ
Received on Thursday, 12 June 2014 21:01:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC