W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: [gcpm] coalescing sequences of numbers for cross-references, back-of-the-book index etc

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 16 Dec 2015 15:01:32 -0800
Message-ID: <CAAWBYDBZ8TeYpQxDk=mohpz94cZD_=6nwrUCpkaM_5rAK6S=hA@mail.gmail.com>
To: "Liam R. E. Quin" <liam@w3.org>
Cc: www-style list <www-style@w3.org>
On Wed, Dec 16, 2015 at 2:42 PM, Liam R. E. Quin <liam@w3.org> wrote:
> On Wed, 2015-12-16 at 11:18 -0800, Tab Atkins Jr. wrote:
>> On Tue, Dec 15, 2015 at 9:51 PM, Liam R. E. Quin <liam@w3.org> wrote:
>> >
>> > [..]
>
>> > See http://barefootliam.blogspot.ca/2015/12/declarative-index-
>> > proposal-
>> > for-printing.html for the actual proposal.
>> >
>> Your examples confuse me - it looks like you have all the information
>> necessary to represent a range and collapse duplicates already,
>> encoded in the markup.
>
> Thanks for the feedback and for looking. I tried to clarify in the edit
> I did. There are two kinds of ranges involved, and I should use a
> different name for one of them.
>
> (1) a discussion that occurs over a range of pages will typically have
> index markers at the start and end of that range. If the two markers
> end up on the same page (18, say), the formatter has to combine them,
> and not put something pathetic and wrong out like,
>     position, absolute, 18-18
> instead of,
>     position, absolute: 18
> But if they are on different pages, 18-19 is correct, or 18-26 or
> whatever.
>
> So the markup can know there was a range but not how to format it.
>
> (2) a sequence of individual isolated instances where something is
> mentioned might end up as
>     position, absolute: 12, 16, 18, 18, 18, 19, 20, 21, 36
> and that must be formatted at run-time as
>     position, absolute: 12, 16, 18-21, 36
>
> You can't do this in the markup because you don't know the page
> numbers.

Right, but you haven't proposed a mechanism for *finding* the page
numbers yet.  Your blog post seems to suggest some generator that
fills them in, so your proposal seems to operate on the DOM content.
This seems... weird?  Why can your generator find the page numbers and
insert them into the DOM, but not format them into attractive ranges?
What's limiting it to solely just inserting page numbers into the DOM?

~TJ
Received on Wednesday, 16 December 2015 23:02:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC